ports not working with sudo

Chris Jones jonesc at hep.phy.cam.ac.uk
Fri Dec 9 13:20:14 UTC 2022


selfupdate requires sudo. try

sudo /opt/local/bin/port -v selfupdate

On 09/12/2022 1:16 pm, Kaustubh Bansal wrote:
> I get following error
> 
> $ port 
> Error: Insufficient privileges to write to MacPorts install prefix.
> 
> On Fri, Dec 9, 2022 at 1:49 PM chilli.namesake at gmail.com 
> <mailto:chilli.namesake at gmail.com> <chilli.namesake at gmail.com 
> <mailto:chilli.namesake at gmail.com>> wrote:
> 
>     Try
> 
>     port -v selfupdate
> 
>     then try to install clang-15 again?
> 
>      > On Dec 9, 2022, at 07:40, Kaustubh Bansal
>     <kaustubh.cool at gmail.com <mailto: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