Thursday, June 30, 2011

Octave io package troubles fixed...

I was trying to use the textread function in Octave 3.2, under Ubuntu 10.04.

All I got was this error message:
error: `textread' undefined near line 5 column 9

I learnt from the internet that I need the io package from Octave-forge.
So, I downloaded it and tried to install it from Octave with this command:

pkg install  io-1.0.14.tar.gz

Unfortunately, that also gave an error message:
Error: the following dependencies where unsatisfied: io needs octave 3.4.0

So, I found out the io-1.0.13 package is compatible with Octave 3.2. The older versions can be found from the Octave-forge directory tree. I downloaded that version and tried to install it with this Octave command:
pkg install  io-1.0.13.tar.gz

Still an error message. 
make: mkoctfile: Command not found
make: *** [textread.oct] Error 127
'make' returned the following error: make: Entering directory `/tmp/oct-TJBAXw/io/src'
mkoctfile textread.cc
make: Leaving directory `/tmp/oct-TJBAXw/io/src'
error: called from `pkg>configure_make' in file /usr/share/octave/3.2.3/m/pkg/pkg.m near line 1253, column 2
error: called from:
error:   /usr/share/octave/3.2.3/m/pkg/pkg.m at line 714, column 5
error:   /usr/share/octave/3.2.3/m/pkg/pkg.m at line 287, column 7
octave:1> pkg install  ~/io-1.0.14.tar.gz
warning: file ~/io-1.0.14.tar.gz does not exist


Googling around, I found that I need to install octave-headers package.
apt-get install octave-headers

Response:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package octave-headers is a virtual package provided by:
  octave3.2-headers 3.2.3-1ubuntu1
  octave3.0-headers 1:3.0.5-7ubuntu2
You should explicitly select one to install.
E: Package octave-headers has no installation candidate


Then by running
apt-get install octave3.2-headers
I finally got the headers installed and started Octave again.

Now, installing the io package finally worked!!!

pkg install  io-1.0.13.tar.gz

A lot of work!

1 comment:

  1. Thanks a lot ZF, your solution works like a charm

    ReplyDelete