2016-10-27 54 views
1

我目前正在使用基本操作系統,無法將安裝捆綁到rails上。問題是無法安裝rjb 1.4.9。雖然它說Java_Home沒有設置,但我可以在路徑中找到它。無法在linux上安裝rjb1.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 
+0

是$ JAVA_HOME >> exported <<?您是否在與您打印$ JAVA_HOME的shell相同的shell中運行該版本? –

+0

是的,我在同一個shell中運行它。 – TheAkbar

+0

你有出口嗎? –

回答

0

嘗試一種更直接的形式給出這樣的:如果你正在使用csh/tcsh的

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

,您可能需要使用setenv來代替。