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

MacPorts noreply at macports.org
Fri Feb 2 09:34:28 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:             |
------------------------+--------------------

Comment (by jmroot):

 The issue is that sudo is configured to change the PATH. You can confirm
 this by running `sudo env`. Running `sudo sudo -V` will give you a lot of
 information about sudo's current configuration on your system. See
 [https://www.sudo.ws/docs/man/sudoers.man/ the documentation] for the
 `env_reset` and `secure_path` sudoers options. This may also be helpful:
 https://unix.stackexchange.com/questions/8646/why-are-path-variables-
 different-when-running-via-sudo-and-su

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


More information about the macports-tickets mailing list