JMagick 配置文件无法找到 Java 个目录

JMagick Configure File Unable to Locate Java Directories

我是 Linux 的新手,正在使用 VM。我正在尝试配置我的 JMagick 安装,但是当我 运行 ./configure 我收到一条错误消息,说它是 'Unable to locate Java directories:'

./configure

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
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 ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking for getconf... /usr/bin/getconf
checking whether large file support needs explicit enabling... no
checking for X... libraries , headers
configure: error: 'Unable to locate Java directories'

我知道 configure 正在寻找 javajavacjargcc。当我在这些项目中的每一个上键入 whereis 时,我看到它们都在我的 $PATH 中的 /usr/bin 中(我什至将每个单独添加到路径中):

PATH=/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/bin/java:/usr/bin/javac:/usr/bin/jar:/usr/bin/gcc

whereis java javac jar gcc

java: /usr/bin/java  /etc/java  /usr/lib/java  /usr/share/java /usr/share/man/man1/java.1.gz
javac: /usr/bin/javac  /usr/share/man/man1/javac.1.gz
jar: /usr/bin/jar  /usr/share/man/man1/jar.1.gz
gcc: /usr/bin/gcc  /usr/lib/gcc  /usr/libexec/gcc  /usr/share/man/man1/gcc.1.gz

据我所知,我认为我需要设置一个 JAVA_HOME 环境变量。所以我做了:

JAVA_HOME=/usr/bin/java

尽管如此,我仍然收到 Unable to locate Java directories 错误。正如我所说,我是 Linux 的新手,我很困惑,不知道该怎么做。关于我做错了什么有什么想法吗?

如果完全相关,VM 上各种技术 运行ning 的当前版本是:

java version "1.7.0_09-icedtea"
OpenJDK Runtime Environment (rhel-2.3.4.1.el6_3-x86_64)
OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)

javac 1.7.0_09

gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)

JMagick需要安装jdk1.6,试试这个:

yum install java-1.6.0-openjdk java-1.6.0-openjdk-devel
  1. yum install java-1.6.0-openjdk java-1.6.0-openjdk-devel
  2. tar zxvf Jmagick.xx.xx
  3. cd 目录
  4. ./configure --prefix=/usr/local/imagemagick/ -with-java-home=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.38.x86_64/
  5. 完成