gcc - C 编译器无法创建可执行文件 Ubuntu 10.04 LTS

标签 gcc ubuntu compilation

我正在尝试在我的 Ubuntu 10.04 LTS 计算机上安装 CUnit lib。我已经将它安装在 Ubuntu 11.04 中没有问题,但是当我尝试在 10.04 上安装时,我得到了这个跟踪:

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/home/cpcaserver5/Área de Trabalho/CUnit-2.1-2/missing: Unknown `--run' option
Try `/home/cpcaserver5/Área de Trabalho/CUnit-2.1-2/missing --help' for more information
configure: WARNING: `missing' script is too old or missing
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
---------- Disabling debug mode compilation.
++++++++++ Enabling automated(XML) mode compilation
++++++++++ Enabling basic mode compilation
++++++++++ Enabling console mode compilation
---------- Disabling curses mode compilation
---------- Disabling examples mode compilation
---------- Disabling test mode compilation
---------- Disabling memtrace functionality at compile time
---------- Disabling use of deprecated v1.1 names
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/cpcaserver5/Área de Trabalho/CUnit-2.1-2':
configure: error: C compiler cannot create executables
See `config.log' for more details

我尝试了很多 libs 和 gcc 版本,所以我认为问题出在 Ubuntu 上,但在哪里或为什么,我不知道!

日志文件的相关部分:
configure:3399: checking whether the C compiler works
configure:3421: gcc  -DRELEASE=@RELEASE@ -Wall -W -pedantic -Wshadow -ansi -I/home/cpcaserver5/Área de Trabalho/CUnit-2.1-2/CUnit/Headers   -L/home/cpcaserver5/Área de Trabalho/CUnit-2.1-2/CUnit/Sources conftest.c  >&5
gcc: de: No such file or directory
gcc: Trabalho/CUnit-2.1-2/CUnit/Headers: No such file or directory
gcc: de: No such file or directory
gcc: Trabalho/CUnit-2.1-2/CUnit/Sources: No such file or directory
configure:3425: $? = 1
configure:3463: result: no

完整的 config.log >> http://pastebin.com/SrWfar1Z

我可以很好地编译 C 文件。

最佳答案

某处存在引用问题,并且您安装的目录 CUnit to 包含空格(和非 ASCII 字符)正在搞砸。

虽然有可能完成这项工作,但我强烈建议您将安装目录更改为根本不包含任何空格的路径,并坚持使用纯 ASCII7 字符(没有重音符号、美洲驼、波浪号或其他)。
如果您的路径“不寻常”,您将遇到很多脚本问题。如果您想要水平间距,请使用下划线 (_)。

关于gcc - C 编译器无法创建可执行文件 Ubuntu 10.04 LTS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10620877/

相关文章:

gcc - 尝试使用GCC构建Octave时未定义对Magick的引用

c - 海湾合作委员会:__attribute__((malloc))

ruby-on-rails - Ubuntu上的Rails3.2+Passenger3+Apache2+RVM

compilation - SBCL 的内联编译和 block 编译有什么区别?

c++ - 如何从 Alexandrescu A. 'Append' 编译模板类 "Modern C++ Design. Generic Programming and Design Patterns Applied"?

c - GCC 为什么以及如何编译缺少 return 语句的函数?

c++ - 甚至来自代码块的意外行为(mingw32-g++)

python - 在 Ubuntu 上监控 python 脚本

linux - Apache HTTP Server Config Variable is not defined 错误 ***如何解决?***

c++ - 获取中间 C 代码的命令行选项