/bin/sh: portmirror: Permission denied

Ryan Schmidt ryandesign at macports.org
Sat Jun 22 23:57:49 PDT 2013

On Jun 22, 2013, at 18:43, Hamed S. Hayatshahi wrote:

> I am trying to install MacPorts on my mac OS X 10.8.2 according to the guide in http://www.macports.org/install.php to install gcc46. When I run the /configure && make && sudo make install , it starts to configure, but then I receive the following message:
> sed -e 's, at TCLSH\@,/usr/bin/tclsh,g' -e 's, at macports_tcl_dir\@,/opt/local/share/macports/Tcl,g' portmirror.tcl > portmirror
> /bin/sh: portmirror: Permission denied
> make[2]: *** [portmirror] Error 1
> make[1]: *** [all] Error 1
> make: *** [all] Error 1
> And it stops.

I cannot explain how the script could be prevented from creating the portmirror script, or any other file, since you ran `make install` using `sudo`, which means it runs as the SuperUser, which means it has permission to do everything.

Is there a particular reason why you need to build MacPorts from source? If not, you can download the precompiled binary from website.

> When I try to run "sudo port install gcc46", it cannot find gcc46.

Presumably the ports tree did not get downloaded. Running "sudo port -v sync" or "sudo port -v selfupdate" should download it, assuming your network does not block rsync traffic.

More information about the macports-users mailing list