2

I'm trying to install ImageMagick by using MacPorts. I've successfully installed MacPorts by using their Mountain Lion .pkg file.

I open the terminal and run:

sudo port install ImageMagick

However what I get is:

Error: Unable to execute port: Could not open file: /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/graphics/ImageMagick/Portfile

Although the error message doesnt contain "permission denied", I tried setting Portfile and its first parent folder to 777. And this obviously didn't solve my problem.

I have the latest Xcode installed.

4
  • Have you executed sudo port selfupdate before attempting to install ImageMagick? Commented Mar 21, 2013 at 13:19
  • Yes I did. But this operation didn't change the result because recently installed MacPorts tree is already up-to-date. What seems interesting is; the mentioned port file exists. It's not corrupted. It has the sufficient permissions (-rw-r--r-- 1 root wheel) so why can't root install it?
    – Lashae
    Commented Mar 22, 2013 at 6:54
  • I'm not on Lion, but tarball directory should be a sibling of release, not a child. Are you able to install other ports, like libpng? Commented Mar 22, 2013 at 14:04
  • This is a valid path: /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/graphics/libpng/Portfile. The only directory in rsync.macports.org/release/ is tarballs/
    – timeSmith
    Commented Mar 22, 2013 at 21:52

1 Answer 1

3

You need to give the user macports read access to /opt

in Finder choose "Go" -> "Go to Folder..."
type /opt and click "Go"
in Finder choose "File" -> "Get Info"
click the little padlock icon in the lower right corner of the "opt Info" window
enter your password (or the username and password of an administrator) and click "OK"
click the little plus in the lower left of the "opt Info" window
choose MacPorts from the list and click "Select"

try again sudo port install ImageMagick

1
  • Command line approach: port file foo for the path to port foo's Portfile, then cd there and chmod +r Portfile. Next sudo port install foo should work.
    – 0 _
    Commented Nov 8, 2013 at 10:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .