Incorrect $PATH value for root user
Помазёнков Виталий
vitorg at yandex.ru
Thu Apr 10 07:48:01 PDT 2014
Yes, but MacPorts can control this. Instead of specifying "export PATH=/opt/local/bin:/opt/local/sbin:$PATH" in ~/.bash_profile it can (and should) specify it system-wide in /etc/bashrc - in this way there will be no problem with programs which is also installed by Apple like svn - all programs will be the same version (installed by MacPorts).
# svn --version
svn, version 1.7.10 (r1485443)
$ sudo -i svn --version
svn, version 1.8.8 (r1568071)
--
Виталий
10 апр. 2014 г., в 18:37, Brandon Allbery <allbery.b at gmail.com> написал(а):
> On Thu, Apr 10, 2014 at 6:39 AM, Помазёнков Виталий <vitorg at yandex.ru> wrote:
> Type command sudo -i and fill your password.
> Type command echo $PATH.
>
> Result
>
> /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/opt/local/bin:/opt/local/sbin
>
> This is sudo's doing (and Apple's insofar as Apple determines both sudo configuration and how the root account works), because you used -i. MacPorts can't control either one. Try sudo -s instead; it preserves your environment.
>
> --
> brandon s allbery kf8nh sine nomine associates
> allbery.b at gmail.com ballbery at sinenomine.net
> unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-users/attachments/20140410/0d4c06f7/attachment.html>
More information about the macports-users
mailing list