在 ARM Nas (Debian Wheezy) 上安装 Java 8

在 ARM Nas (Debian Wheezy) 上安装 Java 8

我的 NAS(ARM7、32 位、Debian Wheezy)上需要 Java 8 来运行 FIM 软件。

uname -a
Linux ReadyNAS 3.0.101.RN_ARM.3 #1 Mon Dec 15 23:39:16 PST 2014 armv7l GNU/Linux

我尝试了包方式:

sh -c 'echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" >> /etc/apt/sources.list' 
sh -c 'echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" >> /etc/apt/sources.list' 
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886 
apt-get update 
apt-get install oracle-java8-installer

我得到了这个错误:

Log started: 2015-12-10  15:30:59
(Reading database ... 18396 files and directories currently installed.)
Unpacking oracle-java8-installer (from .../oracle-java8-installer_8u66+8u65arm-1~webupd8~1_all.deb) ...
dpkg: error processing /var/cache/apt/archives/oracle-java8-installer_8u66+8u65arm-1~webupd8~1_all.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/oracle-java8-installer_8u66+8u65arm-1~webupd8~1_all.deb
Log ended: 2015-12-10  15:31:08

没有解决办法,所以我尝试了另一种方法:

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
tar -xzf jdk-8u65-linux-arm32-vfp-hflt.tar.gz -C/opt/jdk/

/opt/jdk/jdk1.8.0_65/bin/java
-bash: /opt/jdk/jdk1.8.0_65/bin/java: No such file or directory

file /opt/jdk/jdk1.8.0_65/bin/java
/opt/jdk/jdk1.8.0_65/bin/java: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0x71b00d12494277775c92c5ea2cc41bd5cd3c03f3, not stripped

ldd /opt/jdk/jdk1.8.0_65/bin/java
        not a dynamic executable

我该如何处理?

答案1

从这里尝试 deb 包。这对我有用。

http://nebulus.tuxfamily.org/debian/wheezy/openjdk-8/

dpkg -i *.deb

相关内容