我正在使用新款M1 MacBook Pro。我正在尝试通过Homebrew安装具有本地Apple Silicon支持的gtk + 3。首先,它告诉我:无法在Intel默认前缀(/usr/local)上在ARM处理器上安装Homebrew!请在/opt/homebrew中使用“替代安装”之一创建新安装,该信息来源于https://docs.brew.sh/Installation。您可以使用以下命令将以前安装的配方列表迁移过来:
brew bundle dump。我尝试通过Rosetta 2运行终端,但是gtk+3需要ARM支持才能安装,因此没有成功。我尝试手动将代码行解压缩到
/opt/
中的docs.brew.sh,但是它告诉我我没有权限。我尝试用sudo,但没有成功。有什么帮助吗?brew install gtk+3
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> New Formulae
libbsd
==> Updated Formulae
Updated 18 formulae.
错误:无法在Intel默认前缀(/usr/local)上的ARM处理器中通过Homebrew安装!
请使用“替代安装”之一,在/opt/homebrew中创建一个新的安装程序。
您可以使用以下命令迁移先前安装的公式列表:
brew bundle dumporesttokovenko@Orests-MacBook-Pro-2 Homebrew % sudo chmod 755
Password:
usage: chmod [-fhv] [-R [-H | -L | -P]] [-a | +a | =a [i][# [ n]]] mode|entry file ...
chmod [-fhv] [-R [-H | -L | -P]] [-E | -C | -N | -i | -I] file ...
oresttokovenko@Orests-MacBook-Pro-2 Homebrew % https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
zsh: no such file or directory: https://github.com/Homebrew/brew/tarball/master
tar: could not chdir to 'homebrew'
oresttokovenko@Orests-MacBook-Pro-2 Homebrew % curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 128 100 128 0 0 254 0 --:--:-- --:--:-- --:--:-- 255
0 1979k 0 598 0 0 682 0 0:49:32 --:--:-- 0:49:32 682tar: could not chdir to 'homebrew'
1 1979k 1 33478 0 0 34728 0 0:00:58 --:--:-- 0:00:58 364k
curl: (23) Failed writing body (0 != 1370)
oresttokovenko@Orests-MacBook-Pro-2 Homebrew % sudo curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 128 100 128 0 0 348 0 --:--:-- --:--:-- --:--:-- 348
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0tar: could not chdir to 'homebrew'
1 1979k 1 34138 0 0 41887 0 0:00:48 --:--:-- 0:00:48 129k
curl: (23) Failed writing body (0 != 1370)