Editing Octave for Debian systems
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
* ''This article addresses the [[:Category:Installation|installation]] and [[Building]] of GNU Octave on Debian, and Debian-based distributions such as Ubuntu.'' | * ''This article addresses the [[:Category:Installation|installation]] and [[Building]] of GNU Octave on Debian, and Debian-based distributions such as Ubuntu.'' | ||
Binary packages for GNU Octave and many [[Octave Forge]] packages are provided by all versions of Debian and Ubuntu. These are the most well-tested binaries available and should work best for most users. To install them, run: | Binary packages for GNU Octave and many [[Octave Forge]] packages are provided by all versions of Debian and Ubuntu. These are the most well-tested binaries available and should work best for most users. To install them, run: | ||
Line 17: | Line 15: | ||
sudo apt-get install octave-control octave-image octave-io octave-optim octave-signal octave-statistics | sudo apt-get install octave-control octave-image octave-io octave-optim octave-signal octave-statistics | ||
Up to 2018, the [https://launchpad.net/~octave GNU Octave Team] on Launchpad actively maintained a PPA providing more up to date packages of Octave. These | Up to 2018, the [https://launchpad.net/~octave GNU Octave Team] on Launchpad actively maintained a PPA providing more up to date packages of Octave. These are backported from Debian unstable and are still useful for older Ubuntu installations. To set up your system to install these packages, run: | ||
sudo apt-add-repository ppa:octave/stable | sudo apt-add-repository ppa:octave/stable | ||
Line 23: | Line 21: | ||
sudo apt-get install octave | sudo apt-get install octave | ||
== Building Octave | == Building Octave == | ||
: ''For general build instructions, see [[Building]].'' | : ''For general build instructions, see [[Building]].'' | ||
Line 50: | Line 48: | ||
or, for the sake of convenience, use some "one-liner" to install them: | or, for the sake of convenience, use some "one-liner" to install them: | ||
* '''Ubuntu 18.04 (LTS)''' | * '''Ubuntu 18.04 (LTS)''' | ||
:<pre>sudo apt-get install gcc g++ gfortran make | :<pre>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-x11 libgraphicsmagick++1-dev libhdf5-serial-dev openjdk-8-jdk libsndfile1-dev llvm-dev lpr texinfo libgl1-mesa-dev libosmesa6-dev pstoedit portaudio19-dev libqhull-dev libqrupdate-dev libqscintilla2-dev libsuitesparse-dev texlive texlive-generic-recommended libxft-dev zlib1g-dev autoconf automake bison flex gperf gzip icoutils librsvg2-bin libtool perl rsync tar qtbase5-dev qttools5-dev qttools5-dev-tools libqscintilla2-qt5-dev</pre> | ||
* '''Ubuntu 16.04 (LTS)''' | * '''Ubuntu 16.04 (LTS)''' | ||
:<pre>sudo apt-get install gcc g++ gfortran make | :<pre>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-x11 libgraphicsmagick++1-dev libhdf5-serial-dev openjdk-8-jdk libsndfile1-dev llvm-dev lpr texinfo libgl1-mesa-dev libosmesa6-dev pstoedit portaudio19-dev libqhull-dev libqrupdate-dev libqscintilla2-dev libqt4-dev libqtcore4 libqtwebkit4 libqt4-network libqtgui4 libqt4-opengl-dev libsuitesparse-dev texlive libxft-dev zlib1g-dev autoconf automake bison flex gperf gzip icoutils librsvg2-bin libtool perl rsync tar</pre> | ||
* '''Debian 9''' | * '''Debian 9''' | ||
:<pre>sudo apt-get install gcc g++ gfortran make | :<pre>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-8-jdk libsndfile1-dev llvm-dev texinfo libgl1-mesa-dev libosmesa6-dev pstoedit portaudio19-dev libjack-jackd2-dev libqhull-dev libqrupdate-dev libqscintilla2-dev libqt4-dev libqtcore4 libqtwebkit4 libqt4-network libqtgui4 libqt4-opengl-dev libsuitesparse-dev texlive libxft-dev zlib1g-dev autoconf automake bison flex gperf gzip icoutils librsvg2-bin libtool perl rsync tar</pre> | ||
* '''Debian 8''' | * '''Debian 8''' | ||
:<pre>sudo apt-get install gcc g++ gfortran make | :<pre>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 libgl1-mesa-dev libosmesa6-dev pstoedit portaudio19-dev libqhull-dev libqrupdate-dev libqscintilla2-dev libqt4-dev libqtcore4 libqtwebkit4 libqt4-network libqtgui4 libqt4-opengl-dev libsuitesparse-dev texlive libxft-dev zlib1g-dev autoconf automake bison flex gperf gzip icoutils librsvg2-bin libtool perl rsync tar</pre> | ||
Line 105: | Line 74: | ||
=== Configuration === | === Configuration === | ||
Some | As mentioned above, Octave can be compiled with the default settings using {{Codeline|./configure && make && make install}}. You can also tweak the setup using configure options. Some examples are given below for a Linux system. | ||
==== Java ==== | ==== Java ==== | ||
Autodetection for | Autodetection for java should work well on Debian-based systems. A specific Java version can be specified by passing {{codeline|JAVA_HOME}} to configure, for example | ||
./configure JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 | ./configure JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 | ||
Line 121: | Line 90: | ||
The problem is that there are multiple versions of the hdf5 package. Octave was written with the serial version in mind but it is likely to work with the others (OpenMPI and Mpich). Due to the naming scheme done in Debian, it may be required to specify the location of the libraries. See bug {{bug|38928}} for details (starting with comment #19) but basically, use the following when running configure: | The problem is that there are multiple versions of the hdf5 package. Octave was written with the serial version in mind but it is likely to work with the others (OpenMPI and Mpich). Due to the naming scheme done in Debian, it may be required to specify the location of the libraries. See bug {{bug|38928}} for details (starting with comment #19) but basically, use the following when running configure: | ||
./configure --with-hdf5-includedir=/usr/include/hdf5/serial --with-hdf5-libdir=/usr/lib/ | ./configure --with-hdf5-includedir=/usr/include/hdf5/serial --with-hdf5-libdir=/usr/lib/x86_64-linux-gnu/hdf5/serial | ||
On older versions of Debian and Ubuntu, where only one flavor of the HDF5 library could be installed at a time, you may need to build Octave against one of the MPI-enabled flavors. On these older systems, configuring Octave like this may work: | On older versions of Debian and Ubuntu, where only one flavor of the HDF5 library could be installed at a time, you may need to build Octave against one of the MPI-enabled flavors. On these older systems, configuring Octave like this may work: | ||
./configure CPPFLAGS="-I/usr/include/mpi -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX" | ./configure CPPFLAGS="-I/usr/include/mpi -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX" | ||
== See also == | == See also == |