1

I am trying to install Android Studio in Ubuntu 14.04. (AMD processor)

Immediately after the install command ./studio.sh it comes back with the message:

/usr/local/java/jdk1.8.0_65/bin/java: 6: /usr/local/java/jdk1.8.0_65/bin/java: Syntax error: ")" unexpected

Can anyone help me deal with this please?

9
  • And please edit your question and add the output of /usr/local/java/jdk1.8.0_65/bin/java -version; uname -a
    – A.B.
    Nov 10, 2015 at 18:16
  • The above error warning is what I am asking about (i.e. the one in my question ending with ")" unexpected.
    – Mojay
    Nov 10, 2015 at 18:22
  • It's Android Studio 1.4. ASnd the error message was copied directly from the terminal so the one I give above is accurate.
    – Mojay
    Nov 10, 2015 at 18:24
  • Can I have the output of the commands above?
    – A.B.
    Nov 10, 2015 at 18:26
  • ./studio.sh was the command. What I got back says: /usr/local/java/jdk1.8.0_65/bin/java: 6: /usr/local/java/jdk1.8.0_65/bin/java: Syntax error: ")" unexpected
    – Mojay
    Nov 10, 2015 at 18:28

1 Answer 1

0

You have downloaded the wrong architecture for your system.

$ file /usr/local/java/jdk1.8.0_65/bin/java
/usr/local/java/jdk1.8.0_65/bin/java: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.7.0, BuildID[sha1]=4d4d0222e883a3bf4320256278c6c0bfe14a1c11, not stripped

says ARM aarch64

$ uname -a
Linux maurice-HP-ProBook-455-G1 3.19.0-32-generic #37~14.04.1-Ubuntu SMP Thu Oct 22 09:41:40 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

says x86_64

You need Linux x64 and not Linux ARM.

Delete your Java installation

sudo rm -r /usr/local/java/jdk1.8.0_65

and install the right architecture...


To install Oracle Java

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

To install OpenJDK

sudo apt-get install openjdk-8-jdk
7
  • But this machine has an AMD processor. Are you sure?
    – Mojay
    Nov 10, 2015 at 18:46
  • Yes, I am very sure.
    – A.B.
    Nov 10, 2015 at 18:47
  • So the code you have just sent me is the code I need to run?> (I'm not being silly about this - it's that I have had so many cockups it's getting to be a pain)
    – Mojay
    Nov 10, 2015 at 18:49
  • So what can I do to change it to Linux x64?
    – Mojay
    Nov 10, 2015 at 18:58
  • Perhaps, ... read my answer?
    – A.B.
    Nov 10, 2015 at 19:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .