gpt4 book ai didi

java - 无法在 linux 上安装 rjb1.4.9 指出未设置 java_home

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:34:26 25 4
gpt4 key购买 nike

我目前正在开发 elementary 操作系统,无法在 Rails 上进行捆绑安装。问题是无法安装 rjb 1.4.9。虽然它说 Java_Home 未设置,但我可以在路径中找到它。

$JAVA_HOME
bash: /usr/lib/jvm/java-1.8.0-openjdk-amd64/: Is a directory



Building native extensions. This could take a while...
ERROR: Error installing rjb:
ERROR: Failed to build gem native extension.

current directory: /var/lib/gems/2.3.0/gems/rjb-1.4.9/ext
/usr/bin/ruby2.3 -r ./siteconf20161026-13902-19etf2h.rb extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/$(RUBY_BASE_NAME)2.3
extconf.rb:53:in `<main>': JAVA_HOME is not set. (RuntimeError)

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.3.0/gems/rjb-1.4.9 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/rjb-1.4.9/gem_make.out

最佳答案

尝试更直接的方法,例如:

JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64 gem install rjb

如果您使用的是 csh/tcsh,则可能必须改用 setenv。

关于java - 无法在 linux 上安装 rjb1.4.9 指出未设置 java_home,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40275414/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com