2016-06-19 16 views
0

私のCentOSサーバー上でノードv0.10.xを使用していました。node.jsを更新したいので、いくつかの記事に従ってください。現在インストールされている最初に削除する:centOSはyum経由でnodejsをインストールできない

# which node 
# cd /usr 
# rm -r bin/node bin/node-waf include/node lib/node lib/pkgconfig/nodejs.pc share/man/man1/node.1 

次にノード-vが正常に動作していないことを確認します。しかし、yumを使用することで、最新のNode.jsをインストールしていないので、私はいくつかの記事を検索し、これを見つけた:https://www.metachris.com/2015/10/how-to-install-nodejs-5-on-centos-and-ubuntu/

はので、私はコマンドに続く:

# rpm -Uvh https://rpm.nodesource.com/pub_5.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm 
# yum install nodejs -y 

をし、これが問題です。多数のエラーを出力し、失敗を続けます。常に一つでも最新をダウンロードしたバージョン0.10.xを、言っているのでしかし、これは、全く機能していません

# npm cache clean -f 
# npm install -g n 
# n stable 

Resolving Dependencies 
--> Running transaction check 
---> Package nodejs.x86_64 0:0.10.42-4.el6 will be updated 
--> Processing Dependency: nodejs(x86-64) = 0.10.42-4.el6 for package:  nodejs-devel-0.10.42-4.el6.x86_64 
---> Package nodejs.x86_64 0:5.11.1-1nodesource.el7.centos will be an update 
--> Running transaction check 
---> Package nodejs-devel.x86_64 0:0.10.42-4.el6 will be updated 
---> Package nodejs-devel.x86_64 0:5.11.1-1nodesource.el7.centos will be an update 
--> Finished Dependency Resolution 

Dependencies Resolved 

================================================================================ 
Package   Arch  Version       Repository  Size 
================================================================================ 
Updating: 
nodejs   x86_64 5.11.1-1nodesource.el7.centos nodesource 8.7 M 
Updating for dependencies: 
nodejs-devel x86_64 5.11.1-1nodesource.el7.centos nodesource 7.6 M 

Transaction Summary 
================================================================================ 
Upgrade 1 Package (+1 Dependent package) 

Total size: 16 M 
Is this ok [y/d/N]: y 
Downloading packages: 
Running transaction check 
Running transaction test 


Transaction check error: 
    file /usr/lib/node_modules/npm/node_modules/semver/package.json from install of nodejs-5.11.1-1nodesource.el7.centos.x86_64 conflicts with file from package nodejs-semver-2.1.0-1.el6.noarch 
    file /usr/lib/node_modules/npm/node_modules/semver/bin/semver from  install of nodejs-5.11.1-1nodesource.el7.centos.x86_64 conflicts with file from package nodejs-semver-2.1.0-1.el6.noarch 
    file /usr/lib/node_modules/npm/node_modules/semver/semver.js from install of nodejs-5.11.1-1nodesource.el7.centos.x86_64 conflicts with file from package nodejs-semver-2.1.0-1.el6.noarch 
    ... and keeps going on ... 

はまた、前のノードを削除し、私もこれをやりました! (私は6.2.2か何かを裁断した)

私のサーバーで何かがうんざりしていると私はこれを解決する方法を知らない。誰かが何かアドバイスをくれますか?また可能であれば、最新のNode.jsをインストールしたいそのノードのパッケージを管理するために、NPMにアクセスするにはEPELリポジトリ

yum update 
yum install epel-release 
yum install nodejs 
node --version 

からのノードをインストール

+1

あなたは* **見つける/ -name nodejs-semver-2.1.0-1.el6.noarch –

+0

@JJHakala * nodejs-semver-2.1.0-1.el6.noarch *パッケージを削除してみてください*結果は空です。それはファイルですか? – modernator

+1

@modernator、rpmパッケージはパッケージとして保存されず、インストール先(/ usr /)にインストールされてからキャッシュから削除されます。 ...削除:# 'yum remove nodejs-semver' ... –

答えて

2

yum install npm 
+3

** yum update **は同じエラーで失敗します。 – modernator

関連する問題