0

我想在我自己的机器(Ubuntu 12.04 LTS)上安装 Storm,我按照中的说明进行操作

    https://github.com/nathanmarz/storm/wiki/Installing-native-dependencies.

当我安装jzmq时,我首先成功执行了命令

    sudo ./autogen.sh

但是,当我执行

    sudo ./configure

配置错误:

    'configure: error: the JAVA_HOME environment variable must be set to your JDK location.' 

出现。

我已经设置了 JAVA_HOME 使用

    sudo gedit /etc/profile
    export JAVA_HOME=/usr/lib/jvm/jdk1.6.0_35
    export JRE_HOME=.....
    export CLASSPATH=......
    source /etc/profile

和输出

    echo $JAVA_HOME

    '/usr/lib/jvm/jdk1.6.0_35'.

我不知道为什么会发生错误,有人知道吗?非常感谢。

4

2 回答 2

2

在几个月前安装 JZMQ 作为 Storm 0.82 安装的一部分时遇到了同样的问题。通过完全按照您上面概述的方式解决了这个问题。JZMQ 还有其他一些问题。复制我的安装步骤,希望它们会有用。

NOTE: OPENJDK 6 Required! 
- sudo apt-get install openjdk-6-jdk
- export JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64
- MUST READ: 
  - http://stackoverflow.com/questions/12115160/compiling-jzmq-on-ubuntu
  - https://github.com/nathanmarz/storm/wiki/Installing-native-dependencies
- wget https://github.com/nathanmarz/jzmq/archive/master.zip
- cd /usr/local/
  - sudo unzip jzmq-master.zip (OR master.zip)
  - cd jzmq-master
  - INSTALL:
    - Potentially Missing Pre-req:
      - libtool: sudo apt-get install libtool
      - autoconf: sudo apt-get install autoconf
      - (automake was already installed)
    - sudo ./autogen.sh
    - **Edit ./configure file to add "export JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64"**
    - sudo ./configure
    - cd src
    - sudo touch classdist_noinst.stamp
    - sudo CLASSPATH=.:./.:$CLASSPATH javac -d . org/zeromq/ZMQ.java org/zeromq/ZMQException.java org/zeromq/ZMQQueue.java org/zeromq/ZMQForwarder.java org/zeromq/ZMQStreamer.java
    - cd ..
    - sudo make
    - sudo make install
于 2014-03-07T04:15:31.120 回答
2

############################################################################### Here I give my way to solve the problem:

  1. Open configure in jzmq folder

    sudo gedit configure
    
  2. Find codes bellow:

    # Check for JDK
    if test "x$JAVA_HOME" = "x"; then
        as_fn_error $? "the JAVA_HOME environment variable must be set to your JDK location." "$LINENO" 5;
    fi
    
  3. set JAVA_HOME here:

    # Check for JDK
    export JAVA_HOME=/usr/lib/jdk1.6.0_35
    echo $JAVA_HOME
    if test "x$JAVA_HOME" = "x"; then
        as_fn_error $? "the JAVA_HOME environment variable must be set to your JDK location." "$LINENO" 5;
    fi
    
  4. This method can solve my problem, maybe it is useful for you.

于 2014-03-07T08:33:35.760 回答