![Nodejs: 依存: rlwrap ですがインストールできません](https://rvso.com/image/652676/Nodejs%3A%20%E4%BE%9D%E5%AD%98%3A%20rlwrap%20%E3%81%A7%E3%81%99%E3%81%8C%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%9B%E3%82%93.png)
クラウドで新しい仮想サーバー、Ubuntu 14.04 を購入しました。
apt-get update を使用してパッケージを更新しました。
Node.js をインストールしようとしたときに問題が発生しました。次のガイドに従いました:https://github.com/joyent/node/wiki/installing-node.js-via-package-manager
実行するとsudo apt-get install -y nodejs
次のようになります:
user@server 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.
この rlwrap とは何ですか? Google で検索しましたが、インストール方法が見つかりません。
--アップデート--
以下の提案を試しました。成功しませんでした。12.04 にダウングレードしました。そこではすべて機能しました。
答え1
Ubuntu 14.04 でもまったく同じ問題が発生しました。解決策:
- ダウンロード
rlwrap
はこちらhttp://packages.ubuntu.com/trusty/rlwrap。 がここにあります直接リンク - インストールする
sudo dpkg -i rlwrap_0.34-2_amd64.deb
- Node.jsをインストールする
sudo apt-get install nodejs
答え2
- ユニバースリポジトリを有効にする
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
- 修正と更新
sudo dpkg --configure -a && sudo apt-get update && sudo apt-get -y upgrade
- もう一度試してください(node.js の手順では Ubuntu リポジトリをカスタムリポジトリに置き換えるので、スクリプトが機能していることを確認してください)。
>apt-cache show rlwrap Package: rlwrap Priority: optional Section: universe/editors Installed-Size: 300 Maintainer: Ubuntu Developers <[email protected]> Original-Maintainer: Francois Marier <[email protected]> Architecture: amd64 Version: 0.37-2 Provides: readline-editor Depends: libc6 (>= 2.4), libncurses5 (>= 5.7+20100313), libreadline6 (>= 6.0) Filename: pool/universe/r/rlwrap/rlwrap_0.37-2_amd64.deb Size: 80968 MD5sum: 8fca381b84e7205b92615d2d2f6df588 SHA1: ea227d0b53c16cec64f259e349d69073fce972f8 SHA256: 09d5d948a387f77a1f09b8ad800a73349dbcd6245f787496e0f1743df5259ea4 Description-en: readline feature command line wrapper This package provides a small utility that uses the GNU readline library to allow the editing of keyboard input for any other command. Input history is remembered across invocations, separately for each command; history completion and search work as in bash and completion word lists can be specified on the command line. Homepage: http://utopia.knoware.nl/~hlub/uck/rlwrap/ Description-md5: 2dd4e4df63ed824e61c4e21ad05cd1eb Bugs: https://bugs.launchpad.net/ubuntu/+filebug Origin: Ubuntu Task: edubuntu-desktop-kde, edubuntu-desktop-gnome
答え3
Ubuntu 14.04 に node.js をインストールするために私がうまくいった方法と、なぜこの方法で node をインストールするのがよいのかを少し説明します。これには、
多くの人が使用しており、Ubuntu の node で最も人気のある PPA と思われるサードパーティの PPA を追加することが含まれます。以下を実行します。
sudo apt-get install python-software-properties
+
sudo apt-add-repository ppa:chris-lea/node.js
+
sudo apt-get update
+
sudo apt-get install nodejs
インストールを確認する
node -v
背景
nodejs は Debian と Ubuntu で使用されている「node」と呼ばれる別のパッケージと競合しているようです。
たとえば、Ubuntu リポジトリを次のように検索すると、
apt-cache search node | grep Amateur
というパッケージが表示されます
ノード - アマチュアパケット無線ノードプログラム (移行パッケージ)
これは古いアマチュア無線パッケージであり、Debian/Ubuntuは両方のUbuntuリポジトリでnodejsよりも優先しています。そしてコマンドライン引数として。
間違っているかもしれませんが、Debain/Ubuntu は、2 つのパッケージ間の競合を防ぐために、nodejs
通常のコマンドが である場所でコマンドを使用するように node の バージョンを変更したのではないかと思います。アマチュア無線バージョンをインストールする予定はないので、コマンド に応答することがわかっている非公式バージョンをインストールすることにしました。他の nodejs 関連プログラムが を呼び出そうとして応答が得られない場合、破損の可能性が高いと思われるためです。node
node
node
答え4
Ubuntu Vivid (Ubuntu BQ タブレット) に Node をインストールしようとしている人は、@bekce のソリューションに従ってください。ただし、マシンのアーキテクチャに注意する必要があります。私のタブレットは なので、次の場所からをarmhf
ダウンロードしました:rlwrap
armhf
wget https://launchpad.net/ubuntu/+source/rlwrap/0.41-1
残りは同じです:
sudo dpkg -i rlwrap_0.34-2_amd64.deb
sudo apt-get install nodejs