![commons-daemon ./configureが$ JAVA_HOMEを認識できないのはなぜですか? [閉鎖]](https://linux33.com/image/5306/commons-daemon%20.%2Fconfigure%E3%81%8C%24%20JAVA_HOME%E3%82%92%E8%AA%8D%E8%AD%98%E3%81%A7%E3%81%8D%E3%81%AA%E3%81%84%E3%81%AE%E3%81%AF%E3%81%AA%E3%81%9C%E3%81%A7%E3%81%99%E3%81%8B%EF%BC%9F%20%5B%E9%96%89%E9%8E%96%5D.png)
Tomcat 7サーバーをインストールしようとしています。私はフォローアップをしています。このガイドラインTomcat 7ドキュメントから。また、変数をおよびおよびJAVA_HOME
に設定しました。ログインシェルとユーザーシェルの両方でORを実行すると、すべての場合に期待される結果が得られます。ただし、どのシェルでもこれを行うと、次のようになります。~/bashrc
~/.bash_profile
/etc/profile
$JAVA_HOME
sudo $JAVA_HOME
user@debian:/usr/local/tomcat7/bin/commons-daemon-1.0.15-native-src/unix$ sudo ./configure
私は得る:
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking cached host system type... ok
*** C-Language compilation tools ***
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for ranlib... ranlib
checking for strip... strip
*** Host support ***
checking C flags dependant on host system type... ok
*** Java compilation tools ***
checking for JDK location... configure: error: Java Home not defined. Rerun with --with-java=... parameter
私が逃したものは何ですか?もちろん使用しますが、--with-java=...
動作しないという事実のため、非常に混乱しています。
また、設定スクリプトで何が起こっているのかを理解しようとしましたが、正しい場所を見つけましたが、実際に何が起こっているのかわかりません。
答え1
私の問題が解決したことがわかりました~/.bashrc
。