Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
Have you executed sudo port selfupdate before attempting to install ImageMagick? –  emcconville Mar 21 '13 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 Mar 22 '13 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? –  emcconville Mar 22 '13 at 14:04
    
This is a valid path: /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/graph‌​ics/libpng/Portfile. The only directory in rsync.macports.org/release/ is tarballs/ –  timeSmith Mar 22 '13 at 21:52

1 Answer 1

up vote 3 down vote accepted

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

share|improve this answer
    
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. –  johntex Nov 8 '13 at 10:14

Your Answer

 
discard

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.