Docker安装ruby2.1

# sudo apt-get install Python-software-properties
# sudo apt-add-repository ppa:brightbox/ruby-ng
# sudo apt-get update
# sudo apt-get install ruby2.1 ruby2.1-dev

1、Ubuntu无法找到add-apt-repository问题的解决方法

解决方案:

apt-get install python-software-properties
apt-get install software-properties-common

2、当运行apt-get update后出现如下错误时:

E: Some index files failed to download, they have been ignored, or old ones used instead.

解决方案:

rm /var/lib/apt/lists/partial/*

原文地址:https://www.cnblogs.com/Genesisx/p/6150594.html