Dayve67
(Dayve67)
January 8, 2017, 2:34pm
1
Ok. I downloaded the Ubuntu base image from Pine64 and flashed to my SD Card, did all update and upgrades.
Then I followed these instructions to install a 32 bit version of java. https://www.digitalocean.com/community/tutorials/how-to-manually-install-oracle-java-on-a-debian-or-ubuntu-vps
Just changed things up so I had the most recent version.
wget --header “Cookie: oraclelicense=accept-securebackup-cookie” http://download.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-arm32-vfp-hflt.tar.gz
tar -zxf jdk-8u111-linux-arm32-vfp-hflt.tar.gz -C /opt/jdk
update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_111/bin/java 100
update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.8.0_111/bin/javac 100
Everything goes well until I check the java version with java -version then I get.
ubuntu@localhost:~$ java -version
-bash: /usr/bin/java: No such file or directory
Not sure what I did wrong. I have not even tried to install openhab2 yet.
watou
(John Cocula)
January 8, 2017, 2:45pm
2
If you logout and log back in, is java
still not found on your path?
Dayve67
(Dayve67)
January 8, 2017, 2:55pm
3
I have tried login out and even did a reboot. Still not there.
watou
(John Cocula)
January 8, 2017, 3:09pm
4
Something like this might make a difference:
Put this at the end of your /etc/profile
export JAVA_HOME="/path/to/java/jdk"
export PATH=$PATH:$JAVA_HOME/bin
Dayve67
(Dayve67)
January 8, 2017, 3:36pm
5
Do I put in the path to where the java is after JAVA_HOME=
watou
(John Cocula)
January 8, 2017, 6:25pm
6
JAVA_HOME
should be set to the directory that contains bin/java
(that is, that contains the bin
directory, in which the java
program is located). You might find it by
sudo find / -name java -print
Dayve67
(Dayve67)
January 8, 2017, 7:52pm
7
Sorry for being such a newbie. But learning minute by minute.
Here is what I see:
ubuntu@localhost:~$ sudo find / -name java -print
[sudo] password for ubuntu:
/var/lib/dpkg/alternatives/java
/opt/jdk/jdk1.8.0_111/bin/java
/opt/jdk/jdk1.8.0_111/jre/bin/java
/etc/alternatives/java
/usr/bin/java
ubuntu@localhost:~$
ranielsen
(Rob Nielsen)
January 8, 2017, 11:19pm
10
Dayve67
(Dayve67)
January 8, 2017, 11:22pm
11
Will that work if I want to install the 32 bit version?
ranielsen
(Rob Nielsen)
January 9, 2017, 1:49pm
12
david
(david)
January 9, 2017, 7:11pm
13
I had a similar problem. It is related to the 32-bit java binaries looking for 32-bit OS libraries.
Try these steps.
enable 32-bit architecture
dpkg --add-architecture armhf
install required 32-bit libraries
apt-get install libc6:armhf libncurses5:armhf libstdc++6:armhf
Feel free to join the Openhabian discussion. We are working to have the Pine64 supported.
The 32-bit java on pine issue is also reported here:
opened 02:35PM - 28 Dec 16 UTC
closed 11:09PM - 17 Feb 17 UTC
Currently there are known performance and serial device (ZWave) issues when 64-b… it java is used. On a 64-bit ARM machine we should instead install 32-bit java.
https://community.openhab.org/t/openhabian-hassle-free-rpi-image/13379/400?u=david
Your input would be appreciated.