How can I install a package from Octave Forge? I am using imresize function and I get this error

warning: the 'imresize' function belongs to the image package from Octave Forge which seems to not be installed in your system.

I tried doing this octave:1> pkg install -forge image-2.4.1.tar.gz. I got this error.

error: get_forge_pkg: package not found: "image-2.4.0.tar.gz". Maybe you meant "generate_html?" error: called from: error: /usr/share/octave/3.8.1/m/pkg/private/get_forge_pkg.m at line 73, column 9 error: /usr/share/octave/3.8.1/m/pkg/private/get_forge_download.m at line 26, column 12 error: /usr/share/octave/3.8.1/m/pkg/pkg.m at line 385, column 29

What are available packages for image processing in octave? How can I install them?

  • 3
    Doesn't -forge mean download and install directly from the octaveforge repository? In which case you would just pass the package name i.e. pkg install -forge image (you should get the most recent available version for your platform). OTOH if you're trying to install a local tarball that you already downloaded, it would be pkg install image-2.4.1.tar.gz (without the -forge). – steeldriver Oct 13 '15 at 16:11
  • You need also root permission to install in root directories. This means that you need to start octave as root, that is, from a terminal try: sudo octave and then pkg install -forge image – Harris Apr 20 '17 at 11:37
  • You can also install the pre-packaged version of octave-image by typing at a terminal: sudo apt-get install octave-image followed by your password. – Harris Apr 20 '17 at 11:39

If you use -forge then only put the name and not the version.

pkg install -forge package_name   # (not the version)

is what you want

You can alternative do this:- This is permanent fix. In your terminal type

sudo apt-get install octave-<package_name_you_want> (eg-image)

and then in octave type

pkg load <pkg name>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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