Need help with Portfile

Behrang Saeedzadeh behrangsa at
Tue Dec 9 04:11:44 PST 2014


As part of a Portfile I am writing, I need to install a Ruby gem, so I have
added this build block:

build {
   system "${prefix}/bin/gem-1.8 install CFPropertyList"

This fails, because without root privileges, the gem cannot be installed.
However if I change the build block to use sudo:

build {
   system "sudo ${prefix}/bin/gem-1.8 install CFPropertyList"

It also fails, but this time with this error message:

:info:build sh: /usr/bin/sudo: Operation not permitted

What's the proper way of invoking such commands that need root level

Best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the macports-users mailing list