Warning: Calling formula.plist_path is deprecated. Use formula.launchd_service_path instead.

Homebrew 的使用之旅

问题描述:

今天在使用 brew services list 指令的时候,输出一直含有警告内容⚠️:
Warning: Calling formula.plist_path is deprecated. Use formula.launchd_service_path instead.

虽然不影响使用,但是却不太“优雅”。


解决方式:

这个警告是因为在 Homebrew 2.6.0 版本中, formula.plist_path 属性已被弃用,替代方法是使用 formula.launchd_service_path 属性。如果你的 Homebrew 版本较旧,可以通过升级 Homebrew 来解决这个问题。

如果你已经升级到最新版本的 Homebrew,但仍然看到这个警告,可能是由于某些软件包的代码仍在使用 formula.plist_path,需要进行更新,你可以通过以下步骤来解决:

  • 观察输出内容,确定是哪一个软件发出的警告
  • 按照警告给出的路径,打开对应文件并定位到具体代码行
  • 将 formula.plist_path 属性替换为 formula.launchd_service_path
    Warning: Calling formula.plist_path is deprecated. Use formula.launchd_service_path instead.
    Warning: Calling formula.plist_path is deprecated. Use formula.launchd_service_path instead.
    经过以上操作,警告消失,程序正常运行。

猜你喜欢

转载自blog.csdn.net/qq_35760825/article/details/129423505
今日推荐