[MacPorts] #69263: sudo: port command not found--------already update environment

MacPorts noreply at macports.org
Fri Feb 2 05:42:04 UTC 2024


#69263: sudo: port command not found--------already update environment
------------------------+--------------------
  Reporter:  DeliaLing  |      Owner:  (none)
      Type:  defect     |     Status:  closed
  Priority:  Normal     |  Milestone:
 Component:  base       |    Version:  2.9.1
Resolution:  invalid    |   Keywords:
      Port:             |
------------------------+--------------------
Changes (by ryandesign):

 * status:  new => closed
 * component:  ports => base
 * resolution:   => invalid


Old description:

> Hello,
> I am facing below issue after installed Macports from website, I searched
> from google that it could be environment variable issue, so I added port
> in PATH as below, please have a look this issue, thanks.
>
> ++++++++++++++++++++++++++++++++++++=
> Last login: Thu Feb 1 15:55:26 on ttys000
> linzha02 at CRP-MAC-NUAMD6N ~ % sudo port install putty
> sudo: port: command not found
> linzha02 at CRP-MAC-NUAMD6N ~ % echo $PATH
> /opt/local/bin:/opt/local/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Applications/CyberArk
> EPM.app/Contents/Helpers:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/linzha02/Library/Android/sdk/emulator:/Users/linzha02/Library/Android/sdk
> /platform-
> tools:/Users/linzha02/Library/Android/sdk/tools:/Users/linzha02/Library/Android/sdk/tools/bin:/opt/local/bin/:/opt/local/sbin/
> linzha02 at CRP-MAC-NUAMD6N ~ % port -v
> MacPorts 2.9.1
> Entering shell mode... ("help" for help, "quit" to quit)
> [Users/linzha02] >

New description:

 Hello,
 I am facing below issue after installed Macports from website, I searched
 from google that it could be environment variable issue, so I added port
 in PATH as below, please have a look this issue, thanks.

 {{{
 ++++++++++++++++++++++++++++++++++++=
 Last login: Thu Feb 1 15:55:26 on ttys000
 linzha02 at CRP-MAC-NUAMD6N ~ % sudo port install putty
 sudo: port: command not found
 linzha02 at CRP-MAC-NUAMD6N ~ % echo $PATH
 /opt/local/bin:/opt/local/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Applications/CyberArk
 EPM.app/Contents/Helpers:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/linzha02/Library/Android/sdk/emulator:/Users/linzha02/Library/Android/sdk
 /platform-
 tools:/Users/linzha02/Library/Android/sdk/tools:/Users/linzha02/Library/Android/sdk/tools/bin:/opt/local/bin/:/opt/local/sbin/
 linzha02 at CRP-MAC-NUAMD6N ~ % port -v
 MacPorts 2.9.1
 Entering shell mode... ("help" for help, "quit" to quit)
 [Users/linzha02] >
 }}}

--

Comment:

 By adding /opt/local/bin to the PATH, you fixed the problem. MacPorts is
 now working correctly.

 `port -v` means: enter interactive mode verbosely. That's probably not
 what you want. Press Control-D to exit interactive mode.

 If you wanted to see the version of the port command, use `port version`.

-- 
Ticket URL: <https://trac.macports.org/ticket/69263#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list