MacOS 我在哪里可以找到 /usr/etc 中的内容?

MacOS 我在哪里可以找到 /usr/etc 中的内容?

我最近试图重新安装所有 Homebrew 库,但意外删除了/usr/etc而不是/usr/local/etc使用rm -rf。当尝试重新安装 torch-rnn 时,我收到此错误:

Prefix set to /Users/why262/Documents/Programming/torch/install
Installing Lua version: LUAJIT21
/Users/why262/Documents/Programming/torch/exe/luajit-rocks/luajit-2.1/src/host/minilua.c:34:10: fatal error: 
      'math.h' file not found
#include <math.h>
         ^~~~~~~~
1 error generated.
make[2]: *** [exe/luajit-rocks/luajit-2.1/CMakeFiles/minilua.dir/src/host/minilua.c.o] Error 1
make[1]: *** [exe/luajit-rocks/luajit-2.1/CMakeFiles/minilua.dir/all] Error 2
make: *** [all] Error 2
install_name_tool: error: unable to read SDK settings for '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk'
install_name_tool: error: unable to read SDK settings for '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk'
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: /Users/why262/Documents/Programming/torch/install/lib/libluajit.dylib (No such file or directory)
./install.sh: line 107: /Users/why262/Documents/Programming/torch/install/bin/luarocks: No such file or directory
Installing common Lua packages

我认为这是因为我删除了/usr/etc。有什么方法可以恢复文件吗?

答案1

您需要从您自己的备份中恢复该目录;该目录/usr/etc特定于您的系统。

macOS(至少 10.14.x Mojave)没有/usr/etc。它有一个 ,/etc它是 的符号链接/private/etc,但没有/usr/etc。所以你的/usr/etc一定是你安装的某个东西。

相关内容