I try to install MacPorts and get this
$ sudo make install
make: getcwd: Permission denied
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
===> making install in doc
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
chdir: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
make: getcwd: Permission denied
/usr/bin/install -c -d -o root -g admin -m 0755 "/opt/local"
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
install: mkdir /opt: Permission denied
make[1]: *** [install] Error 71
make: *** [install] Error 1
I am also not able to
$ sudo mkdir /opt
mkdir: /opt: Permission denied
I can create the directory with
open /
and then with Finder.
I am also able to install MacPorts with the installer .pgk, but then:
sudo port install htop
Error: Insufficient privileges to write to MacPorts install prefix.
ls -l /opt. Did you try to uninstall everything(xcode+command line tools and macports) and then install it again? If you don't need macports specifically, I'd recommend brew. I know, it is not the perfect solution but I assuming it is a bug of MacPorts(seeing the rising questions from other users) and you are not able to do anything right now. – napcae Oct 27 '13 at 21:59