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

时间:2012-05-16 14:38:16

标签: 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文件。

2 个答案:

答案 0 :(得分:2)

某处存在引用问题,而且您安装CUnit的目录包含空格(以及非ASCII字符)这一事实正在搞乱。

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

答案 1 :(得分:0)

来自./configure的输出众所周知是无益的,除了一行:

See `config.log' for more details

这就是真正错误消息的位置。