在排查PATH路径问题时,用户发现苹果在macOS 27.0的系统根目录中新增了/pkg目录,并将其添加到了系统PATH列表中1。这一变化通过文件/etc/paths.d/10-pmk-global实现,其中的"10"表示该路径的优先级1。
/pkg目录包含env、etc、inv、var四个子目录1。根据其目录结构,有观点推测这可能与Apple未来的软件包管理系统相关1。不过该目录的具体用途目前仍不明确。
值得注意的是,/pkg目录在macOS 26.4版本时就已被添加到Data volume中,但直到macOS 27.0才正式纳入Signed System Volume的根目录1。系统工具path_helper自Mac OS X 10.5(2007年)起就已存在,用于读取/etc/paths和/etc/paths.d中的条目,从而动态构建PATH环境变量1。
A previously undocumented directory has appeared in the root of macOS 27.0, sparking questions about Apple's future software infrastructure. The /pkg directory was discovered during troubleshooting of system PATH issues and has been added to the system's PATH list, specifically incorporating /pkg/env/global/bin 1. The directory structure contains four subdirectories—env, etc, inv, and var—suggesting it may be related to an upcoming package management system, though its exact purpose remains unclear 1.
The addition of /pkg to the system PATH is facilitated through the file /etc/paths.d/10-pmk-global, where the prefix "10" denotes priority level 1. Apple's inclusion of this directory follows a phased approach: the /pkg directory was first added to the Data volume in macOS 26.4, before appearing in the Signed System Volume's root directory in macOS 27.0 1. This mechanism for managing system paths has been in place since Mac OS X 10.5 in 2007, when the path_helper tool was introduced to read entries from /etc/paths and /etc/paths.d 1.
评论
还没有评论,欢迎留下第一条。