Unable to download data from http://ruby.taobao.org/ & don't have write permissions for th

Posted 谈晓鸣

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Unable to download data from http://ruby.taobao.org/ & don't have write permissions for th相关的知识,希望对你有一定的参考价值。

  安装cocoapods,记录两个问题!

1、镜像已经替换成了 http://ruby.taobao.org/, 还是不能不能安装cocoapods, 报错:Unable to download data from http://ruby.taobao.org/ - bad response Not Found 404 (http://ruby.taobao.org/latest_specs.4.8.gz)

如图:

 

原来是ruby.taobao.org已经停止基于 HTTP 协议的镜像服务, 启用 HTTPS 协议代替。

解决办法,输入:

gem sources --add https://ruby.taobao.org/ --remove http://ruby.taobao.org/

回车,然后如图所示:

 

2、第一个问题结束后,还不能安装,没有写入权限:You don\'t have write permissions for the /Library/Ruby/Gems/2.0.0 directory.

   如图:

   解决办法,输入:

sudo gem install -n /usr/local/bin cocoapods

回车,ok, 能安装了:

 

 

原文链接:http://www.cnblogs.com/tandaxia/p/5612259.html

 

 

------ ------- 2017 update ---------

最新ruby镜像更新地址:http://gems.ruby-china.org/

安装步骤:

1、更新ruby最新版本

sudo gem update --system

2、更新镜像源,默认是:https://rubygems.org/, 更换为:https://gems.ruby-china.org/

gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/

3、安装cocoapods  命令行

sudo gem install -n /usr/local/bin cocoapods --pre

就OK了 ! 

 

部分截图:

 

------ ------- 2019 update ---------

淘宝镜像又更改了

gem sources -add https://gems.ruby-china.com/ --remove https://rubygems.org/

 

以上是关于Unable to download data from http://ruby.taobao.org/ & don't have write permissions for th的主要内容,如果未能解决你的问题,请参考以下文章

flash loader demo下载程序,最后一步失败,(stm32,vc6t)提示:fail:unable to download data

MemoryError: Unable to allocate 115. GiB for an array with shape (1122, 1122, 12288) and data type f

Your computer was unable to download the solution at this time. Check to make sure your computer is

Mysql错误Unable to connect to remote host. Catalog download has failed.

MySQL笔记: 启动弹窗问题,unable to connect to remote host. catalog download has failed.

Sublime Text提示Unable to download XXX. Please view the console for more details安装插件失败解决