installer doesn't modify root path
Phil Oertel
phillipao at gmail.com
Mon Feb 1 21:33:44 PST 2016
I'm unable to sudo run any port commands after installing macports (version
2.3.4, system is El Capitan 10.11.3). I installed via the package
installer. After running the installer and opening a new shell, my login
user has /opt/local/bin on his path, but root does not. So `sudo port`
results in "not found".
I filed a bug, https://trac.macports.org/ticket/50503, and it was promptly
closed by ryandesign@ with the following explanation: "You're not meant to
use root; you're meant to use sudo from your normal admin user account."
Isn't that the same thing? That is, doesn't any command run via sudo
execute as root, using root's PATH? And in any event, `sudo port version`
results in "sudo: port: command not found". Can anyone advise?
Thanks!
Appendix: some commands and output:
$ port version
Version: 2.3.4
$ sudo port version
Password:
sudo: port: command not found
$ printenv PATH
/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/git/current/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
$ sudo printenv PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
$ which port
/opt/local/bin/port
$ sudo which port
$
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-users/attachments/20160201/1d1fca8a/attachment.html>
More information about the macports-users
mailing list