【问题标题】:RedHat C compiler does not compile?RedHat C 编译器不编译?
【发布时间】:2019-07-20 21:14:39
【问题描述】:

我从昨天开始就坐在我的 redhat 7 系统上安装问题的 ruby​​ 上。我已经安装了 gcc cc 和 g++。几次重启也没有帮助我总是得到以下错误:

[root@ld01 bin]# rbenv install 2.6.1
Downloading ruby-2.6.1.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.1.tar.bz2
Installing ruby-2.6.1...

BUILD FAILED (Red Hat Enterprise Linux Server 7.6 using ruby-build 20190130-4-g0e33b11)

Inspect or clean up the working tree at /tmp/ruby-build.20190227084942.17275
Results logged to /tmp/ruby-build.20190227084942.17275.log

Last 10 log lines:
/tmp/ruby-build.20190227084942.17275 /usr/bin
/tmp/ruby-build.20190227084942.17275/ruby-2.6.1 /tmp/ruby-build.20190227084942.17275 /usr/bin
checking for ruby... false
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking whether the C compiler works... no
configure: error: in `/tmp/ruby-build.20190227084942.17275/ruby-2.6.1':
configure: error: C compiler cannot create executables
See `config.log' for more details

我认为您需要 config.log,但我在哪里可以找到日志文件?

【问题讨论】:

  • 错误消息中提到了/tmp/ruby-build.20190227084942.17275/tmp/ruby-build.20190227084942.17275.log/tmp/ruby-build.20190227084942.17275/ruby-2.6.1。这些是否存在?你可能会在那里找到config.log。你需要建立ruby吗?你的redhat 7系统没有现成的包吗?

标签: ruby linux compiler-errors centos redhat


【解决方案1】:

我猜你已经下载了 Ruby 并试图在现有版本上安装它 - 如果是这样,这可能会破坏事情。如果 Ruby 2.5 就足够了,我建议使用 RHEL 中可用的版本作为软件集合。安装信息是here

软件集合与原始 Ruby 版本(由操作系统使用)一起使用,因此不会出现任何问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-07-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-25
    • 2011-10-08
    • 1970-01-01
    相关资源
    最近更新 更多