Ubuntu – Java Oracle Installation /usr/bin/java: cannot execute binary file

javamacoracle

Hi I've been trying for 1 day to get Oracle Java running on Ubuntu.

I have a powermac g5 with Ubuntu 12.04 ppc64.

uname -a :

Linux LK37 3.2.0-53-powerpc64-smp #81-Ubuntu SMP Thu Aug 22 21:17:14 UTC 2013 ppc64 ppc64 ppc64 GNU/Linux

lspci:

david@LK37:~$ sudo lspc [sudo] password for david:  sudo: lspc:
command not found david@LK37:~$ sudo lspci 0000:00:0b.0 PCI bridge:
Apple Inc. CPC945 PCIe Bridge 0000:0a:00.0 VGA compatible controller:
NVIDIA Corporation NV43 [GeForce 6600 LE] (rev a2) 0001:00:00.0 Host
bridge: Apple Inc. U4 HT Bridge 0001:00:01.0 PCI bridge: Broadcom
BCM5780 [HT2000] PCI-X bridge (rev a3) 0001:00:02.0 PCI bridge:
Broadcom BCM5780 [HT2000] PCI-X bridge (rev a3) 0001:00:03.0 PCI
bridge: Broadcom BCM5780 [HT2000] PCI-Express Bridge (rev a3)
0001:00:04.0 PCI bridge: Broadcom BCM5780 [HT2000] PCI-Express Bridge
(rev a3) 0001:00:05.0 PCI bridge: Broadcom BCM5780 [HT2000]
PCI-Express Bridge (rev a3) 0001:00:06.0 PCI bridge: Broadcom BCM5780
[HT2000] PCI-Express Bridge (rev a3) 0001:00:07.0 PCI bridge: Apple
Inc. Shasta PCI Bridge 0001:00:08.0 PCI bridge: Apple Inc. Shasta PCI
Bridge 0001:00:09.0 PCI bridge: Apple Inc. Shasta PCI Bridge
0001:01:07.0 Unassigned class [ff00]: Apple Inc. Shasta Mac I/O
0001:01:0b.0 USB controller: NEC Corporation OHCI USB Controller (rev
43) 0001:01:0b.1 USB controller: NEC Corporation OHCI USB Controller
(rev 43) 0001:01:0b.2 USB controller: NEC Corporation uPD72010x USB
2.0 Controller (rev 04) 0001:03:0c.0 IDE interface: Broadcom K2 SATA 0001:03:0d.0 Unassigned class [ff00]: Apple Inc. Shasta IDE
0001:03:0e.0 FireWire (IEEE 1394): Apple Inc. Shasta Firewire
0001:05:04.0 Ethernet controller: Broadcom Corporation NetXtreme
BCM5780 Gigabit Ethernet (rev 03) 0001:05:04.1 Ethernet controller:
Broadcom Corporation NetXtreme BCM5780 Gigabit Ethernet (rev 03)
david@LK37:~$

I tried various ways to install Oracle Java but I always end up with:

bash: /usr/bin/java: cannot execute binary file

At the moment I have Installed jdk-7u25-linux-x64.tar.gz in /usr/lib/jvm/jdk1.7.0/bin/ as said in this post

I already tried the web install but I get a 404 error.
I hope you can help me. I started using Ubuntu yesterday so please give me the complete terminal code, it will be a lot easier for me. For those who care I want to play Minecraft and with the OpenJDK I got a java.lang error. That's why I want to install Oracle Java.

Best Answer

Minecraft is awesome! But you do not need a jdk unless you plan on developing java.

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

You have some locale setting errors. Here, follow the instructions here and see if that resolves your issue, and let me know if it does: How do I fix my locale issue?
https://help.ubuntu.com/community/Locale

As to you are getting a binary execution error, I'm not to sure. It could be that you have an integrated chip environment using intel / nvidia with optimus. Some more details would help to determine what that is. Run lspci and post those results in your question area please. If it says intel integrated graphics, and somewhere says that you have nvidia, then that is your problem and you will need to install bumblebee and use optirun minecraft so you can use opengl.

Related Question