【问题标题】:Installed atom using MacPorts, but it doesn't show up in Launchpad or Applications folder使用 MacPorts 安装 atom,但未显示在 Launchpad 或 Applications 文件夹中
【发布时间】:2021-01-13 21:04:06
【问题描述】:

我想像在 Linux 中一样使用终端安装文本编辑器 Atom (https://atom.io),因此我按照本教程在我的 Mac(版本 11.1 Big Sur)上执行了以下步骤,以使我能够使用 MacPorts 命令线工具:

https://guide.macports.org/chunked/installing.macports.html

我执行的步骤是:

  1. 直接从 App Store 安装 Xcode(文件很大,下载需要 40 分钟)。

  2. 以传统下载方式安装 MacPorts(即不是从终端或 App Store 而是从网站:https://github.com/macports/macports-base/releases/tag/v2.6.4

版本:MacPorts-2.6.4_1-11-BigSur.pkg

这是我安装的 MacPorts 版本的直接链接:https://github.com/macports/macports-base/releases/download/v2.6.4/MacPorts-2.6.4_1-11-BigSur.pkg

接下来我开始了直接从终端安装 Atom 的有趣部分。我使用以下命令这样做:

sudo port -fp install atom

这安装了相当长的依赖项列表(30-40 项)。安装成功完成。

在终端(zsh 终端)中,我通过键入来测试是否安装了 atom:

atom --version

返回错误:

"command not found: atom"

我还在 Launchpad、Spotlight Search 和 Applications 文件夹中查找了 Atom。好像也没有。

问题:有没有人看到我缺少的东西,或者 Atom 可能已经安装到的任何想法?

【问题讨论】:

  • 要查看安装的端口运行port contents atom 您不需要安装中的-fp - 这可能会抑制错误,因此请重试。
  • 确实,安装时几乎不应该使用-f-p-f 表示覆盖已经存在的文件;那里不应该已经有文件,所以如果有的话,你会希望 MacPorts 停止并出现错误。 -p 表示如果有错误则继续;你也不想这样;您可能想停止并修复错误。但如果安装成功,在没有-f-p 的情况下再次尝试将无济于事。

标签: terminal atom-editor macports


【解决方案1】:

port contents 显示通过端口安装的内容。例如:

port contents atom

应该向您显示它已安装到 /Applications/MacPorts/Atom.app。

MacPorts 安装的应用程序应该会显示在 Spotlight 搜索和 Launchpad 中,但安装后可能需要片刻时间,Spotlight 才会将其添加到其索引中。您可能需要手动启动一次应用程序(通过在 Finder 中双击它),然后它才会显示在 Launchpad 中。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-04-30
    • 1970-01-01
    • 1970-01-01
    • 2021-04-11
    • 1970-01-01
    • 2017-11-10
    • 2017-11-10
    • 1970-01-01
    相关资源
    最近更新 更多