|
|
(13 intermediate revisions by 5 users not shown) |
Line 1: |
Line 1: |
| Installing in Userland is a methode to install GNU Octave next to your repository installation at the same time. This works with every Linux distribution and is especially for old Ubuntu LTS versions very profitable!
| | #REDIRECT [[Building]] |
| | |
| One advantage is that you do not clutter your system by running ''sudo make install''.
| |
| Another advantage is that you can keep your octave installation that is provided by your distribution.
| |
| | |
| == 1. Install dependencies ==
| |
| | |
| You need at least a set of developement utils.
| |
| | |
| For Debian (and Debian-based distributions)
| |
| sudo apt-get install build-essential
| |
| For Arch Linux
| |
| sudo pacman -S base-devel
| |
| | |
| For more informations, take a look at the ''./configure'' summary and/or read INSTALL.OCTAVE! [[Octave_for_Debian_systems#Dependencies|This]] is worth reading too.
| |
| | |
| ==== TL;DR ====
| |
| | |
| Example for Ubuntu 12.04 alias, any animal...'''it's rough – no claim to completeness nor to correctness!'''
| |
| | |
| sudo apt-get install libblas-dev liblapack-dev libarpack2-dev libcurl4-gnutls-dev epstool libfftw3-dev transfig libfontconfig1-dev \
| |
| libfreetype6-dev libgl2ps-dev libglpk-dev libreadline-dev gnuplot libgraphicsmagick++-dev libhdf5-serial-dev openjdk-7-jdk lpr texinfo \
| |
| libgl-dev* pstoedit libqhull-dev libqrupdate-dev libqscintilla2-dev libqt4-dev libqtcore4 libqtwebkit4 libqt4-network libqtgui4 \
| |
| libsuitesparse-dev libxft-dev zlib1g-dev autoconf automake bison flex gperf gzip libtool make perl rsync tar g++ gcc gfortran make wget \
| |
| libpcre++-dev llvm-3.3-dev libfltk1.3-dev texlive build-essential
| |
| | |
| | |
| == 2. Download Octave Sourcecode ==
| |
| | |
| Take a release from ftp.gnu.org, e.g. 3.8.0.
| |
| | |
| wget ftp://ftp.gnu.org/gnu/octave/octave-3.8.0.tar.bz2
| |
| tar xfvj octave-3.8.0.tar.bz2
| |
| cd octave-3.8.0/
| |
| | |
| or clone current stable branch
| |
| | |
| hg clone http://hg.octave.org/octave/
| |
| cd octave/
| |
|
| |
| | |
| == 3. configure ==
| |
| | |
| Only if you want to install from mercurial ''(hg.octave.org)'', you have to do first:
| |
| ./bootstrap
| |
| | |
| Now it's time to run ./configure with a prefix that points to a directory in your home directory. E.g., my username is ''maxpower'' and I want to install Octave to ''~/.octave38/''
| |
| ./configure --prefix=/home/maxpower/.octave38/
| |
| Pay attention to the configure summary at the end (See chapter 1).
| |
| | |
| == 4. make & make install ==
| |
| | |
| After you have successful configured octave without errors ''(warnings may be okey)'', you can run ''make''. If you have a dual core cpu, you can run make with two threads like that (increase -j number if you have more cpu cores).
| |
| make -j2
| |
| This may take now ~30-300 Minutes (depends on the speed of your cpu and the size of your RAM) :)
| |
| | |
| Feel free to run ''make check'' too.
| |
| | |
| When ''make -j2'' finished without errors, simply run '''without''' sudo/root permissions
| |
| make install
| |
| Octave will now be installed to /home/maxpower/.octave38/
| |
| | |
| | |
| == 5. create a smart bashrc entry ==
| |
| | |
| echo "alias octave38='~/.octave38/bin/octave'" >> ~/.bashrc
| |
| . ~/.bashrc # this will update your bashrc without doing logout and login!
| |
| | |
| If you simply enter ''octave'', you'll start your repository installation provided by your distribution. But when you enter ''octave38'', you'll start your new snappy octave version installed to your home directory.
| |
| | |
| == Uninstall ==
| |
| | |
| ==== Methode A ====
| |
| | |
| If you're still have the compiled source folder, just do ''make uninstall'' from it. And don't forget to remove the ''alias octave38'' entry in your ''~/.bashrc''.
| |
| | |
| ==== Methode B ====
| |
| | |
| Just delete (e.g. ''rm -rf ~/.octave38/'') the install folder and remove the ''alias octave38'' entry from your ''~/.bashrc''.
| |
| | |
| | |
| [[Category:Building]] | |
| [[Category:Installation]]
| |