How to Install Additional Octave Packages in openSUSE

Tags: 

In openSUSE it's easy to install Octave. All you have to do is add the Pacman repository, search for Octave, and mark it for installation. For some, people the base version of Octave is enough for what they need to do, but sometimes additional packages are necessary for more specialized tasks. For example, I need the signals package do do things like finding correlations or designing filters. Unfortunately, in openSUSE adding the packages is a little bit trickier than installing the program itself. This tutorial will show you how to install additional packages. It assues that you already have Octave installed. At the time of writing I am using openSuse 11.2 and Octave 3.2.4.

  1. Install Additional Linux Packages
  2. Download Octave Packages
  3. Install Octave Packages

Install Additional Linux Packages

The first step is to install some additional Linux packages that are needed for Octave to be able to install its own packages. To install the Linux packages, open up Kickoff > Computer > Install Software. Then search for and mark the following for installation.

  • gcc-c++
  • readline-devel
  • zlib-devel

Return to Top

Download Octave Packages

The next step is to download the Octave packages that you want to install. To download the packages, go to Octave's official site and click on packages - Link. Don't close the site right away after downloading the desired packages. Most likely when you do the next step and try to actually install the package, Octave will tell you that you are missing some other package that the one you are trying to install depends on. Also, don't unzip the packages. Octave will do that on its own. So now you can move on to the next part.

Return to Top

Install Octave Packages

To install the package you just downloaded, first open up Octave (open the terminal and type "octave"). Then change your directory to the folder containing the downloaded package using the "cd" command. Type "ls" to list the contents of the current folder and make sure that you see the package file. If it's not there then you are in the wrong folder. If you are in the right folder, type the following command to install it "pkg install FILENAME" where you replace FILENAME with the full name of the package. Since I was trying to install the signals package, I did this:

octave:1> pkg install signal-1.0.11.tar.gz

The next thing I got was an error telling me I was missing some other packages. If you get a message like this, go back to the octave website and download whatever it needs. It doesn't matter if you download a newer version of the file it is asking for. In the end I had to install the following packages in the following order: miscellaneous > optim > specfun > signal. It was annoying, but at least it was only four. If you don't get a message telling you to install other packages, then Linux will try to compile and install the package. You will most likely get a screen full of warnings, but unless you get errors, it doesn't matter. To check what packages are already installed or to check if the package was installed correctly, type "pkg list" and you should get a list of the currently installed packages. If you see it there then it means that the installation was successful.

octave:1> pkg list
Package Name   | Version | Installation directory
---------------+---------+-----------------------
        audio *|   1.1.4 | /home/adam/octave/audio-1.1.4
miscellaneous *|   1.0.9 | /home/adam/octave/miscellaneous-1.0.9
        optim *|  1.0.12 | /home/adam/octave/optim-1.0.12
       signal *|  1.0.11 | /home/adam/octave/signal-1.0.11
      specfun *|   1.0.9 | /home/adam/octave/specfun-1.0.9

That's it! Your packages should work right away. You can delete the zip files you downloaded from the Octave website, but don't delete the "Octave" folder in your "home" directory that Octave created to store the newly installed packages. If you have any questions or it didn't work, then post a message here or drop me an email.

Return to Top