gpt4 book ai didi

java - JMagick 配置文件无法定位 Java 目录

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:07:16 27 4
gpt4 key购买 nike

我是 Linux 新手,正在 VM 上工作。我正在尝试配置我的 JMagick 安装,但是当我运行 ./configure 时,我收到一条错误消息,提示它“无法定位 Java 目录:”

./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 时,我看到它们都在 /usr/bin 中的 $PATH 中(我什至添加了每个分别到路径):

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 上运行的各种技术的当前版本是:

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)

最佳答案

  1. yum 安装 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. 完成

关于java - JMagick 配置文件无法定位 Java 目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31968058/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com