我是靠谱客的博主 火星上星月,最近开发中收集的这篇文章主要介绍Mac安装binutils工具1.命令安装2.解决办法,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

Mac安装binutils工具

  • 1.命令安装
  • 2.解决办法

1.命令安装

brew install binutils

出现以下错误:

See `config.log' for more details.
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': no implicit conversion of nil into String (TypeError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/Library/ENV/4.3/gcc-4.2:4:in `<main>'
READ THIS: https://git.io/brew-troubleshooting
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:359:in `open_http': 422 Unprocessable Entity (GitHub::Error)
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:737:in `buffer_open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:212:in `block in open_loop'
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:210:in `catch'
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:210:in `open_loop'
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:151:in `open_uri'
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:717:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:31:in `open'
from /usr/local/Library/Homebrew/utils.rb:505:in `open'
from /usr/local/Library/Homebrew/utils.rb:535:in `issues_matching'
from /usr/local/Library/Homebrew/utils.rb:567:in `issues_for_formula'
from /usr/local/Library/Homebrew/exceptions.rb:222:in `fetch_issues'
from /usr/local/Library/Homebrew/exceptions.rb:218:in `issues'
from /usr/local/Library/Homebrew/exceptions.rb:261:in `dump'
from /usr/local/Library/brew.rb:186:in `rescue in <main>'
from /usr/local/Library/brew.rb:76:in `<main>'

随后又执行:

brew update

出现以下错误:

Error: The /usr/local directory is not writable.
Even if this directory was writable when you installed Homebrew, other
software may change permissions on this directory. Some versions of the
"InstantOn" component of Airfoil or running Cocktail cleanup/optimizations
are known to do this.
You should probably change the ownership and permissions of /usr/local
back to your user account.
sudo chown -R $(whoami):admin /usr/local

接着又执行:

sudo chown -R $(whoami):admin /usr/local

又出现:chown: /usr/local: Operation not permitted

2.解决办法

  1. 先卸载ruby
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
  1. 再安装ruby
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  1. 安装binutils
brew install binutils

最后

以上就是火星上星月为你收集整理的Mac安装binutils工具1.命令安装2.解决办法的全部内容,希望文章能够帮你解决Mac安装binutils工具1.命令安装2.解决办法所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(38)

评论列表共有 0 条评论

立即
投稿
返回
顶部