How to install Octave 4.0.0 in Ubuntu 14.04
You have two options:
Use the octave ppa, which already has the 4.0 version. You can install octave like this:
sudo add-apt-repository ppa:octave/stable sudo apt-get update sudo apt-get install octave
Download and compile the sources yourself:
sudo apt-get build-dep octave wget ftp://ftp.gnu.org/gnu/octave/octave-4.0.0.tar.gz tar xf octave-4.0.0.tar.gz cd octave-4.0.0/ ./configure make sudo make install
You can try this, just type the following commands in terminal and compile the source easily:
sudo apt-get install gcc g++ gfortran make libblas-dev liblapack-dev libpcre3-dev libarpack2-dev libcurl4-gnutls-dev epstool libfftw3-dev transfig libfltk1.3-dev libfontconfig1-dev libfreetype6-dev libgl2ps-dev libglpk-dev libreadline-dev gnuplot libgraphicsmagick++1-dev libhdf5-serial-dev openjdk-7-jdk libsndfile1-dev llvm-dev lpr texinfo libglu1-mesa-dev pstoedit libjack0 libjack-dev portaudio19-dev libqhull-dev libqrupdate-dev libqscintilla2-dev libqt4-dev libqtcore4 libqtwebkit4 libqt4-network libqtgui4 libsuitesparse-dev zlib1g-dev libxft-dev autoconf automake bison flex gperf gzip librsvg2-bin icoutils libtool perl rsync tar libosmesa6-dev libqt4-opengl-dev
wget ftp://ftp.gnu.org/gnu/octave/octave-4.0.0.tar.gz
tar xf octave-4.0.0.tar.gz
rm octave-4.0.0.tar.gz
cd octave-4.0.0/
./configure
make -j4
sudo make install
This was OK for Ubuntu & Mint (you can use the command "make" without arguments if you are using a old computer).
This worked for me at the end.
In terminal, install
sudo apt-get build-dep octave
In synaptic, install
libqt4-opengl-dev
Then, download octave-4.0.0.tar.gz from ftp://ftp.gnu.org/gnu/octave/
unzip octave-4.0.0.tar.gz to home.
cd octave-4.0.0
./configure
make
sudo make install
This worked on all the machines I tried in my laboratory.