9月 302017
 

brew install spinx-build 的时候可能会遇到如下错误:

修改 /usr/local/Library/Homebrew/utils.rb 的代码,打印url看看:

莫非访问不了api.github.com  ?

看起来是有返回值的,而且是合法的json,继续看 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb 的代码,发现很可能是httpcode的问题:

发现http code为 422 , 而/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb 遇到 422 是走异常逻辑的,如果能简单修改代码使其认为是正常似乎是可以的; 但是mac 不让修改/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb , root账号也不行

回头看 /usr/local/Library/Homebrew/utils.rb ,发现如下逻辑:

export HOMEBREW_NO_GITHUB_API=1

问题解决

 

其实 spinx-build 是在生成man page的时候用到的,某些情况下,大可不必非要去生成man page

 Posted by at 上午 11:16

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

(required)

(required)

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据