14.04 Live USB 无法安装 nodejs

14.04 Live USB 无法安装 nodejs

我在 USB 上运行 Ubuntu 14.04,并且正在尝试设置 Ruby on Rails 开发环境。

我在安装nodejs时遇到了问题。我使用了以下方法:

sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update

这很好,但是当我运行时:

sudo apt-get install nodejs

我得到:

ubuntu@ubuntu:~$ sudo apt-get install nodejs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nodejs : Depends: rlwrap but it is not installable
E: Unable to correct problems, you have held broken packages.
ubuntu@ubuntu:~$  

所以我找到了这个:ttp://comments.gmane.org/gmane.comp.sysutils.docker.user/201

所以我运行了这个:sudo echo“debhttp://archive.ubuntu.com/ubuntu精确的宇宙”>> /etc/apt/sources.list

但我得到:bash:/etc/apt/sources.list:权限被拒绝

我尝试了其他一些方法,您可以在这里看到(滚动到靠近底部): https://teamtreehouse.com/forum/problems-following-odot-tutorials-using-local-install-pc

但什么都没起作用。Treehouse 上的一个版主现在不知所措。有什么想法吗?

答案1

这应该有效:

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
sudo apt-get update
sudo apt-get install nodejs

相关内容