运行酿造桶安装时出错



以下是错误:

$brew木桶安装崇高文本
错误:没有这样的文件或目录-酿造桶

brew cask install在当天早些时候工作,所以我希望这只是加载路径的变化影响了shell查找和运行brew cask install命令的能力。

所以,我做了一个详尽的搜索:

$ find / ( -name "brew-cask*" -type f ) -or ( -ilname "*brew-cask*" ) 2>/dev/null | grep brew-cask | xargs ls -l
-rw-r--r--  1 lex  admin    0 Sep  1 16:42 /Library/Caches/Homebrew/Formula/brew-cask.brewing
-rwxr-xr-x  1 lex  admin  193 Aug 31 20:35 /Library/Caches/Homebrew/brew-cask--git/bin/brew-cask.rb
-rw-r--r--  1 lex  admin  470 Aug 31 20:35 /Library/Caches/Homebrew/brew-cask--git/brew-cask.rb
-rwxr-xr-x  1 lex  wheel  197 Sep  1 16:39 /usr/local/Cellar/brew-cask/0.15.0/bin/brew-cask.rb
lrwxr-xr-x  1 lex  admin   32 Aug 31 20:35 /usr/local/Library/Formula/brew-cask.rb -> ../Taps/phinze-cask/brew-cask.rb
lrwxr-xr-x  1 lex  admin   29 Sep  1 16:39 /usr/local/Library/LinkedKegs/brew-cask -> ../../Cellar/brew-cask/0.15.0
-rwxr-xr-x  1 lex  admin  193 Aug 31 20:35 /usr/local/Library/Taps/phinze-cask/bin/brew-cask.rb
-rw-r--r--  1 lex  admin  470 Aug 31 20:35 /usr/local/Library/Taps/phinze-cask/brew-cask.rb
lrwxr-xr-x  1 lex  admin   43 Sep  1 16:39 /usr/local/bin/brew-cask.rb -> ../Cellar/brew-cask/0.15.0/bin/brew-cask.rb
lrwxr-xr-x  1 lex  admin   26 Sep  1 16:39 /usr/local/opt/brew-cask -> ../Cellar/brew-cask/0.15.0

最后两行看起来很有趣。。。

$ ls -l /usr/local/Cellar/brew-cask/0.15.0/bin/brew-cask.rb
-rwxr-xr-x  1 lex  wheel  197 Sep  1 16:39 /usr/local/Cellar/brew-cask/0.15.0/bin/brew-cask.rb
$ ls -l /usr/local/Cellar/brew-cask/0.15.0
total 16
drwxr-xr-x  421 lex  wheel  14314 Sep  1 16:39 Casks
-rw-r--r--    1 lex  admin    226 Sep  1 16:39 INSTALL_RECEIPT.json
-rw-r--r--    1 lex  wheel   1909 Sep  1 16:39 README.md
drwxr-xr-x    3 lex  wheel    102 Sep  1 16:39 bin
drwxr-xr-x    5 lex  wheel    170 Sep  1 16:39 rubylib

嗯。。。/usr/local/opt/brew-cask指向一个目录,该目录包含一个bin目录,然后包含酿造桶。。。

然后,我看了看我的装载路径。。。

$ echo $PATH
/Users/lex/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/opt/coreutils/libexec/gnubin:/Users/lex/.rbenv/bin:/Users/lex/.rbenv/shims:/Users/lex/bin:/usr/local/opt:/usr/local/bin:/usr/bin

果不其然,在加载/usr/local/bin中的文件之前,我的PATH已经更改为加载/usr/local/opt中的文件。

其余的"可执行文件"在/usr/local/opt目录中是类似的。所以,我把它从我的道路上移开了。

我再试了一次。。。

$ brew cask install sublime-text
==> Downloading http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.2.dmg
######################################################################## 100.0%
==> Success! sublime-text installed to /opt/homebrew-cask/Caskroom/sublime-text/2.0.2
==> Linking Sublime Text 2.app to /Users/lex/Applications/Sublime Text 2.app

成功:-)

相关内容

  • 没有找到相关文章

最新更新