Ask Your Question
1

Error installing npm 1.3.6-5.fc19.rpm - unpacking of archive failed

asked 2014-09-12 10:19:41 -0500

Raffaello gravatar image

updated 2014-09-13 07:45:27 -0500

Running the command:

sudo yum install npm

I've got the following error:

...
Running transaction
  Installing : npm-1.3.6-5.fc19.noarch                                      1/1 
Error unpacking rpm package npm-1.3.6-5.fc19.noarch
error: unpacking of archive failed on file /usr/lib/node_modules/npm/doc: cpio: rename
  Verifying  : npm-1.3.6-5.fc19.noarch                                      1/1 

Failed:
  npm.noarch 0:1.3.6-5.fc19                                                     

Complete!

How can I resolve it?

p.s.

I installed the 1.3.6-4.fc19 package without any problem. On update, I've got the same error as reported above. I tried remove the package and reinstall it. Not worked.

thx.

EDIT

I also tryed install the package manually and download package from differents mirror. Same error as above, but with a "detail" that was truncated using yum:

Preparing...                          ################################# [100%]
Updating / installing...
   1:npm-1.3.6-5.fc19                 ################################# [100%]
error: unpacking of archive failed on file /usr/lib/node_modules/npm/doc: cpio: rename failed - Is a directory
error: npm-1.3.6-5.fc19.noarch: install failed

There's a restructure of the files of the package and can't handle with previous version with some modules installed. I think it's somenthing like this. So I've cleaned the directory and remove nodejs package too.

So after that I reinstall nodejs and npm pacakges and all work done! There was a problem in my nodejs package too, I think.

Thx.

edit retag flag offensive close merge delete

Comments

Please update to f20 o wait for f21...

davidva gravatar imagedavidva ( 2014-09-13 21:54:42 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
1

answered 2014-09-12 10:32:17 -0500

pnemade gravatar image

updated 2014-09-12 20:37:04 -0500

FranciscoD_ gravatar image

I suggest following

sudo yum clean all
sudo yum install npm

this way if there is a broken npm binary rpm downloaded it will be downloaded freshly, maybe from some other mirror.

edit flag offensive delete link more

Comments

I tried and did not worked. Same error as reported in the question above. :(

Raffaello gravatar imageRaffaello ( 2014-09-12 21:05:25 -0500 )edit

I still think the location from where yum is downloading this rpm is broken.

pnemade gravatar imagepnemade ( 2014-09-13 06:57:05 -0500 )edit

I tried with diffrent mirror, manually install. Same Erorr as above. But I notice the problem is that I've already the directory "doc" (physical) and this packages try to create a link to that directory so there's the conflict. I've manually remove all the parent directory and it work.

Raffaello gravatar imageRaffaello ( 2014-09-13 07:32:52 -0500 )edit

so I think I have a similar problem I ran the commands in this thread and also installed npm and getting multiple errors like this

file /usr/lib/node_modules/npm/package.json from install of npm-1.3.6-5.fc20.noarch conflicts with file from package nodejs-0.10.33-1nodesource.fc20.x86_64

is this a version conflict? should I uninstall both and reinstall current versions?

-- after almost an hour I confirm node is running but installing anything such as nodejs-mkdirp I get a long list of conflicts such as these

      file /usr/lib/node_modules/npm/lib/update.js from install of npm-1.3.6-5.fc20.noarch conflicts with file from package nodejs-0.10.33-1nodesource.fc20.x86_64

file /usr/lib/node_modules/npm/lib/utils/completion/file-completion.js from install of npm-1.3.6-5.fc20.noarch conflicts with file from package nodejs-0.10.33-1nodesource.fc20.x86_64 file /usr/lib/node_modules/npm/lib/utils/completion ...(more)

nycjacob gravatar imagenycjacob ( 2014-11-27 13:10:36 -0500 )edit
0

answered 2017-05-03 13:16:33 -0500

Removing the /usr/lib/node_modules/ subdirectories that remained on my system despite a "dnf remove nodejs npm" fixed this same error for me in F24.

I suspect this was due to the fact that I had manually installed a newer, self-contained binary version of nodejs and then gulp using this nodejs install. Thus, npm was not aware of both the old and new module indexes and the gulp install was omitted when I removed the previous package.

Just a hunch, so perhaps someone can further clarify/ correct my assumption.

edit flag offensive delete link more
0

answered 2014-09-13 07:34:33 -0500

Raffaello gravatar image

It's enough to remove the conflict directory because the new package is not able to update, maybe some node module must be reinstall. Or as alternative maintain the previous version.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-09-12 10:19:41 -0500

Seen: 4,126 times

Last updated: Sep 13 '14