【问题标题】:C compiler cannot create executables Ubuntu 10.04 LTSC 编译器无法创建可执行文件 Ubuntu 10.04 LTS
【发布时间】:2012-05-16 14:38:16
【问题描述】:

我正在尝试在我的 Ubuntu 10.04 LTS 计算机上安装 CUnit 库。我已经将它安装在 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

完整的配置日志>>http://pastebin.com/SrWfar1Z

我可以编译C文件就好了。

【问题讨论】:

    标签: gcc ubuntu compilation


    【解决方案1】:

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

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

    【讨论】:

    • +1:很好看;我也应该看到的。我曾经(相当短暂地)有一个目录“External Source Repositories”,但正是出于这个原因,我现在有了一个目录“External-Source-Repositories”。
    • 就是这个!非常感谢!
    • 好吧,这个问题刚刚让我获得了传奇徽章,感谢您的提问! :)
    【解决方案2】:

    ./configure 的输出是出了名的无用,除了一行:

    See `config.log' for more details
    

    这就是真正的错误消息所在的地方。

    【讨论】:

      猜你喜欢
      • 2021-06-16
      • 2021-02-04
      • 2013-06-17
      • 1970-01-01
      • 1970-01-01
      • 2012-12-03
      • 2015-03-27
      • 1970-01-01
      相关资源
      最近更新 更多