How to compile GNU Octave from sources in Linux using bash script automatically?
Thursday, April 11, 2013 // Linux, News, Tutorials
GNU Octave 3.6.4 has been released. But it does not come with compiled binaries. Please keep reading if you would like to learn how to download, compile and install GNU Octave from sources. All you need to do is to download the following file and make changes necessary and execute it using sh download_install.sh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
#!/bin/bash # This script is entirely free and will help Xoctave users or Octave users to download and # compile GNU Octave from its source together with its dependents. # Please visit http://www.xoctave.com for details and updates. # # Xoctave Developer Team # contact [at] xoctave [dot] com</code> # Download and install required packages or software to compile GNU.Octave sudo apt-get install wget libreadline6 libreadline6-dev libterm-readline-gnu-perl libglu-dev gfortran build-essential libsuitesparse-dev libhdf5-serial-dev glpk fontconfig libfltk1.3-dev libarpack2-dev libcurl4-gnutls-dev gnuplot texinfo g++ libblas3gf libblas-doc libblas-dev liblapack3gf liblapack-doc liblapack-dev # The version of Octave to be downloaded and installed. octaveversion="octave-3.6.4" # GNU.Octave source location downloadfile="http://ftp.gnu.org/gnu/octave/"${octaveversion}".tar.gz" # Create a temporary folder to save GNU.Octave sources tmpdir=$(mktemp -d) # Temporary name for the downloaded compressed source tmpname="octave.tar.gz" # Unzipping folder tmpzip=${tmpdir}/${tmpname} echo $downloadfile echo $tmpdir echo $tmpzip # Download the compressed GNU.Octave source wget -O ${tmpzip} ${downloadfile} # Go to download folder cd ${tmpdir} # Decompress downloaded file tar -xvf ${tmpname} # Go to source cd ${tmpdir}/${octaveversion} # Configure for your system ./configure # Compile Sources (This will take time up to 1hour depending on your systems capabilities) make # Install Compiled sudo make install # echo "Compilation and Installation finished" |
[...]