CMake-配置:权限被拒绝 [英] CMake-Configure: Permission Denied

查看:112
本文介绍了CMake-配置:权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用CMake编译我的项目,在我的一台计算机上它可以完美运行(在Linux机器上),但是另一台计算机(Windows 7 Ultimate 64)确实有问题.

I am trying to compile my Project with CMake, on one of my Computers it works perfectly (a Linux box), but the other one (Windows 7 Ultimate 64) has really problems.

我尝试了多种生成器:

MinGW(独立和来自CodeBlocks):错误消息:

MinGW (standalone and from CodeBlocks): Error message:

(只是应该导致解决方案的部分)

(Just the part that should lead to a solution)

  f:/tools/codeblocks/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe:
  cannot open output file cmTryCompileExec.exe: Permission denied

  collect2: ld returned 1 exit status

Visual Studio 10专业版错误消息:

Visual Studio 10 Professional Error Message:

(仅获得可能有趣的部分,我已将其从德语翻译过来)

(Again only the Part that may be interesting, i have translated it from german)

CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
  The C compiler "cl" is not able to compile a simple test program.
[...]
  1>ClCompile:

  1> testCCompiler.c

  1>LINK : fatal error LNK1104: Datei
  "H:\yps_2\VISUAL\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec.exe" could not be opened.

我现在已经搜索了google和so fpr天,我认为没有人遇到类似的问题...

I have Searched google and SO fpr days now and i think no one had some similar Problem like me...

如果您能帮助我,我会很高兴!

I would be so glad if you could help me guys!

PS:SO上还有另一个问题,例如我的问题,但尚未得到解答: https://stackoverflow.com/questions/7294011/permission-denied-errors-when-using-cmake

PS: There is another Issue on SO like mine, but it is unanswered: https://stackoverflow.com/questions/7294011/permission-denied-errors-when-using-cmake

推荐答案

首先请确保您的计算机未感染病毒:如果存在修改EXE文件的任何病毒,则它们可能是主要原因>您无法写入自己的EXE文件.使用最新的防病毒软件扫描计算机.

First make sure you're computer is not infected with viruses: If any viruses modifying EXE files exist, they can be the main cause you can't write to your own EXE files. Scan your computer with an up-to-date antivirus.

另一个问题可能是您的防病毒软件试图阻止EXE劫持.如果您确定计算机是干净的,请尝试完全禁用防病​​毒软件.

Another problem can be your anti-virus trying to block EXE hijacks. If you're sure your computer is clean, try fully disabling your antivirus.

我想到的另一个解决方案是:

Another solutions that come to my mind are:

  • 尝试右键单击代码块或Visual Studio,然后选择以管理员身份运行.

如果要从命令提示符执行,请确保在管理命令提示符中执行.

If you are executing from Command Prompt, make sure you do it in an administrative Command Prompt.

尝试将CMake和其他相关工具以及输出文件夹放入C:\驱动器中.也许您没有配额或权限来访问其他驱动器?

Try putting the CMake and other related tools and also the output folder in your C:\ drive. Maybe you don't have quota or rights to access other drives?

尝试禁用所有您认为无用的服务.也许某些服务无缘无故地只是在没有使用文件的情况下锁定了文件.

Try disabling all services you see are useless. Maybe some service has just locked the file without using it for no good reason.

尝试卸下H:卷,然后再次安装.(或者使用 diskmgmt.msc 或使用 fsutil卷卸载H:并尝试再次安装它)

Try to dismount your H: volume and mount it again. (Either use diskmgmt.msc or use fsutil volume dismount H: and explore to mount it again)

这篇关于CMake-配置:权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆