首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在linux上安装rjb1.4.9指出未设置java_home

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

Stack Overflow用户
提问于 2016-10-27 11:02:46
回答 1查看 1.2K关注 0票数 1

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

代码语言:javascript
复制
$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
EN

回答 1

Stack Overflow用户

发布于 2016-11-01 20:45:20

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

代码语言:javascript
复制
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64 gem install rjb

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

票数 6
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40275414

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档