ports not working with sudo

Larry Stone lstone19 at stonejongleux.com
Fri Dec 9 16:13:20 UTC 2022


How did you add /opt/local/bin to PATH? If you didn’t do it right, it won’t apply to your sudo command. If you added it to your shell profile or equivalent, you normally need to re-execute the profile or close the shell and reopen.

-- 
Larry Stone
lstone19 at stonejongleux.com





> On Dec 9, 2022, at 4:40 AM, Kaustubh Bansal <kaustubh.cool at gmail.com> wrote:
> 
> Hi
> 
> I recently installed MacPorts on my machine (MacOs Ventura 13.0)
> Installation succeeded.
> I then added /opt/local/bin to PATH
> 
> I am trying to install clang-15. 
> 
> Command:
> $ sudo port install clang-15
> Message: sudo: port: command not found
> 
> Command:
> $ port install clang-15
> Message: Error: Insufficient privileges to write to MacPorts install prefix.
> 
> Command:
> $ which port
> Message: /opt/local/bin/port
> 
> Any idea why por does not work with sudo?
> 
> Thanks
> 
> 



More information about the macports-users mailing list