MacPorts/终端:“无法识别的操作‘sudo’”
我正在尝试在 MAMP 上安装 Image Magick。我真的超出了我的能力范围。
我已经安装了 MacPorts,并打开了终端。我已按照 http 上的说明输入 sudo port -v selfupdate
://www.macports.org/install.php#pkg
但是我从终端得到的响应是无法识别的操作“sudo”
我已经用谷歌搜索了一遍,但不能找到任何有意义的事情。
有聪明人感到慷慨吗?
I'm trying to install Image Magick on MAMP. And I'm seriously out of my depth.
I've installed MacPorts, and opened the terminal. I've typed in sudo port -v selfupdate
per the instructions on http://www.macports.org/install.php#pkg
But the response I get from the Terminal is Unrecognized action "sudo"
I've googled and googled, but can't find anything that makes a slab of sense.
Any clever people feeling generous?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您正在交互模式下运行端口,并且不在系统 shell 中。端口程序不会将 sudo 识别为其命令之一,我猜测您没有使用 sudo 运行端口命令,因此您将无法执行太多操作,请尝试以下操作:
再次打开终端,除了建议的命令之外不要运行任何其他内容:
sudo port -v selfupdate
如果您得到相同的结果,则您仍然或再次处于 Macports 交互式会话中,键入 CTRL + C,或键入退出。
You are running ports on interactive mode, and you are not in your system shell. The port program won't recognize sudo as one of its commands, and I am guessing you didn't run your port command with sudo so you won't be able to do much, try the following:
Open your terminal once again and do not run anything on else but the command suggested:
sudo port -v selfupdate
If you get the same thing, you are still or again in Macports interactive session, type CTRL + C, or type quit.
如果您使用的是 MacOS Ventura,则此命令存在问题
安装 dmg 文件安装程序后:
添加以下命令不需要自我更新:
输入 sudo port 这将为您提供版本并允许您通过 shell 模式进入,
然后您可以输入版本或帮助以获取有关要执行的操作的更多详细信息
If you are using MacOS Ventura then there exists an issue with this command
Once you installed the dmg file installer:
Add in below commands self-update is not required:
Type in sudo port this will give you the version and will allow you to enter via a shell mode
Following that you can type in version or help to get more details on actions to follow