Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to install the statistics package (1.0.10) for Octave (3.2.4), which requires the miscellaneous package. When installing the miscellaneous package (1.0.11) I receive the following error:

couldn't create installation directory
/usr/lib/octave/packages/3.2/miscellaneous-1.0.11 : Permission denied

error: called from `pkg>copy_files' in file /usr/share/octave/3.2.4/m
/pkg/pkg.m  near line 1473, column 13 error: called from: error:  
/usr/share/octave/3.2.4/m/pkg/pkg.m at line 756, column 5

error:   /usr/share/octave/3.2.4/m/pkg/pkg.m at line 287, column 7

I am running Ubuntu 11.04.

What is causing this problem and how do I resolve it?

share|improve this question

migrated from stackoverflow.com Oct 28 '11 at 11:07

This question came from our site for professional and enthusiast programmers.

up vote 2 down vote accepted

The problem is, that you are trying to install the data in a directory where you do not have permission to write data. Either you log in as root or you run the program with root privileges to have access to that directory.

An other way is to specify a prefix in octave itself (see this link), where you want to install your package. Then you would run the following lines in octave:

pkg prefix <destination> <destination>
pkg install miscellaneous-1.0.11.tar.gz

where <destination> is the path to where you want to install your packages.

share|improve this answer
Thanks; running octave as root fixed the problem. – Josh Aug 9 '11 at 0:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.