我安装了 rvm,它告诉我缺少一些包:
viggy@viggy:~$ rvm requirements
Installing requirements for ubuntu, might require sudo password.
Skipping `apt-get update` make sure your system is up to date.
RVM autolibs is now configured with mode '2' => 'check and stop if missing',
please run `rvm autolibs enable` to let RVM do its job or run and read `rvm autolibs [help]`
or visit https://rvm.io/rvm/autolibs for more information.
Missing required packages: libreadline6-dev, zlib1g-dev, libssl-dev, libyaml-dev, libsqlite3-dev, sqlite3, libxml2-dev, libxslt1-dev, autoconf, libgdbm-dev, libncurses5-dev, automake, libtool, bison, libffi-dev.
因此我尝试安装它们但却收到大量无法找到包的错误:
viggy@viggy:~$ sudo apt-get --no-install-recommends install libreadline6-dev, zlib1g-dev, libssl-dev, libyaml-dev, libsqlite3-dev, sqlite3, libxml2-dev, libxslt1-dev, autoconf, libgdbm-dev, libncurses5-dev, automake, libtool, bison, libffi-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libreadline6-dev,
E: Unable to locate package zlib1g-dev,
E: Unable to locate package libssl-dev,
E: Unable to locate package libyaml-dev,
E: Unable to locate package libsqlite3-dev,
E: Unable to locate package sqlite3,
E: Unable to locate package libxml2-dev,
E: Unable to locate package libxslt1-dev,
E: Unable to locate package autoconf,
E: Unable to locate package libgdbm-dev,
E: Unable to locate package libncurses5-dev,
E: Unable to locate package automake,
E: Unable to locate package libtool,
E: Unable to locate package bison,
答案1
所有软件包名称后面都有一个逗号。请删除逗号。
sudo apt-get --no-install-recommends install libreadline6-dev zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev autoconf libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
答案2
您需要检查您的 /etc/apt/sources.list 文件并决定使用哪个软件存储库来获取那些缺失的软件包,并添加这些存储库。
最简单、最快捷的方法是使用 GUI 程序“Synaptic 包管理器”和“软件和更新”
更困难的是通过 CLI。你可以在https://help.ubuntu.com/community/Repositories/CommandLine