1

i have problems installing matlab, while installing it requires installing gcc compiler and java developer kit and gfortran , i've installed all of them but the installation still won't complete :( ,please help me to solve this problem :( thanks


The result of running java -version

java version "1.6.0_24" 
OpenJDK Runtime Environment (IcedTea6 1.11.1) (6b24-1.11.1-4ubuntu2) 
OpenJDK Server VM (build 20.0-b12, mixed mode)

The result of running gcc --version

gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc. 
This is free software; see the source for copying conditions. There is NO 
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
αғsнιη
  • 35,660
  • Can you copy/paste the results of typing java -version and gcc --version into a command prompt? – Mitch Oct 08 '14 at 19:25
  • java version "1.6.0_24" OpenJDK Runtime Environment (IcedTea6 1.11.1) (6b24-1.11.1-4ubuntu2) OpenJDK Server VM (build 20.0-b12, mixed mode)
    – Zahra Rahimi Oct 08 '14 at 19:33
  • gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. – Zahra Rahimi Oct 08 '14 at 19:34
  • Matlab probably wants the Oracle JDK as opposed to the OpenJDK – Mitch Oct 08 '14 at 19:40
  • sorry to ask dumb questions but i'm new to linux , what command should i use ? sudo apt-get install what? – Zahra Rahimi Oct 08 '14 at 19:45

1 Answers1

1

This page states that, for Java, matlab requires two things, neither of which your system has:

  1. JDK 1.7 (You have 1.6)
  2. The Oracle JDK (you have the OpenJDK) (Note: It doesn't explicitly state this, but it links to the Oracle website)

You can fix both in one step by following the instructions in this askUbuntu answer

For gcc, it wants versoin 4.7 or higher. You have 4.6. See this askUbuntu answer on how to solve that.

I didn't ask for your gfortran version, and I'm unsure of how to get it. Verify that your gfortran is at least 4.7 as well.

Mitch
  • 4,697
  • Just edited it with regards to gcc; you'll need to update that as well – Mitch Oct 08 '14 at 19:49
  • gfortran version : GNU Fortran (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 yes i read your edited comment , thank you :) – Zahra Rahimi Oct 08 '14 at 19:52
  • You'll need to update gfortran as well: http://packages.ubuntu.com/search?keywords=gfortran – Mitch Oct 08 '14 at 20:10
  • i don't know which one should i install for gfortran :(:(:( , my operating system is ubuntu 12.04 lts 32bit , sorry, can you help me please :( (gcc and g++ and jdk are up to date now, i don't know which one should i install for gfortran) – Zahra Rahimi Oct 09 '14 at 18:27
  • Try just doing sudo apt-get install gfortran – Mitch Oct 09 '14 at 18:39
  • sorry it's the last question :D , i've installed it, but when i run the command gfortran --version, the version is still 4.6 , how can i configure the version in use and select the new version ? – Zahra Rahimi Oct 09 '14 at 18:56
  • What version of Ubuntu are you using? What does apt-cache policy gfortran show you? – Mitch Oct 09 '14 at 20:04
  • ubuntu 12.04 , Installed: 4:4.6.3-1ubuntu5 Candidate: 4:4.6.3-1ubuntu5 Version table: *** 4:4.6.3-1ubuntu5 0 500 http://ir.archive.ubuntu.com/ubuntu/ precise/main i386 Packages 100 /var/lib/dpkg/status – Zahra Rahimi Oct 10 '14 at 08:13
  • According to this page 4.7 isn't available on 12.04... and a quick google search doesn't get me anything. Maybe try asking another question on how to install it, or consider upgrading to 14.04 – Mitch Oct 10 '14 at 12:42