为什么 commons-daemon ./configure 无法识别 $JAVA_HOME?

为什么 commons-daemon ./configure 无法识别 $JAVA_HOME?

我正在尝试安装 tomcat 7 服务器。我正在跟进这些说明来自 tomcat 7 文档。我还将我的JAVA_HOME变量设置为~/bashrc以及~/.bash_profile/etc/profile。我可以在登录 shell 和用户 shell 中执行$JAVA_HOMEor操作,并且在所有情况下都得到预期结果。sudo $JAVA_HOME但是,当我在任何 shell 上执行此操作时:

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.问题解决了。

相关内容