簡體   English   中英

MacOs Catalina - /usr/bin/env:參數列表太長

[英]MacOs Catalina - /usr/bin/env: Argument list too long

我在安裝/卸載或基本上在我的 Mac 上運行特定命令時遇到問題。

我一直在嘗試安裝一個 brew 庫但它失敗了,我嘗試執行的其他一些不屬於 brew 的命令也失敗了。我已經在谷歌上搜索了很多,但總有一些特定命令的解決方法像rm和find,不是這樣的。

下面是 brew install (install.sh) 和我嘗試過的庫的示例(我從他們的站點下載了 install.sh,因為我也遇到了 curl 安裝命令的問題)

% ./install.sh 
==> Checking for `sudo` access (which may request your password).
Password:
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> The following new directories will be created:
/usr/local/Cellar
/usr/local/Caskroom

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/mkdir -p /usr/local/Cellar /usr/local/Caskroom
==> /usr/bin/sudo /bin/chmod u=rwx,g=rwx /usr/local/Cellar /usr/local/Caskroom
==> /usr/bin/sudo /usr/sbin/chown orirefael /usr/local/Cellar /usr/local/Caskroom
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/Cellar /usr/local/Caskroom
==> /usr/bin/sudo /usr/sbin/chown -R orirefael:admin /usr/local/Homebrew
==> /usr/bin/sudo /bin/mkdir -p /Users/orirefael/Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Users/orirefael/Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown -R orirefael /Users/orirefael/Library/Caches/Homebrew
==> Downloading and installing Homebrew...
HEAD is now at 1f0ed9ddf Merge pull request #12106 from Bo98/style-parser-warning
/usr/local/bin/brew: line 134: /usr/bin/env: Argument list too long
/usr/local/bin/brew: line 134: /usr/bin/env: Undefined error: 0
Failed during: /usr/local/bin/brew update --force --quiet

和庫安裝問題:

% brew install pod
/usr/local/bin/brew: line 134: /usr/bin/env: Argument list too long
/usr/local/bin/brew: line 134: /usr/bin/env: Undefined error: 0

ulimit返回unlimited

ulimit -n返回256

ulimit -n 500000返回ulimit: setrlimit failed: invalid argument

ulimit -s返回16384

要繞過“參數列表太長”,請嘗試:

HOMEBREW_NO_ENV_FILTERING=1 brew install pod

如果還有問題,請重新安裝brew

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM