You are not logged in.

#1 2019-10-15 03:33:08

demondog
Member
Registered: 2019-10-10
Posts: 8

[SOLVED] Regularly getting "conflicting files" errors

Hi, I've been regularly getting "conflicting files" errors on installing packages. I get the error about once every week or two most of the time when installing pacakages I had previously installed then uninstalled later. I always use -Rns when uninstalling packages so as far as I know that should remove all remanants of the packages. Tonight I tried installing npm and was met with 5088 "exists in filesystem" errors from pacman (according to wc -l)... Am I using pacman incorrectly to cause these errors? If not, what can I do to prevent and remediate them? I normally manually delete all the conflicting files but with 5088 files thats no longer a fesable resolution. Thanks in advance for any help or responses. Let me know if theres any relevant logs or info that I can provide. There didn't seem to be anything helpful in my pacman log but I can post that if anyone wants to look at it.

edit: I was just looking through the sea of errors and saw that one of the files it said still exists in my filesystem is /usr/bin/npm. Which has to mean something went wrong with the uninstallation of npm if it didnt even remove the executable from /usr/bin...

Last edited by demondog (2019-10-16 02:45:59)

Offline

#2 2019-10-15 03:56:50

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,461

Re: [SOLVED] Regularly getting "conflicting files" errors

Sounds like you've been using a different package manager as root. npm counts

Offline

#3 2019-10-15 04:08:30

demondog
Member
Registered: 2019-10-10
Posts: 8

Re: [SOLVED] Regularly getting "conflicting files" errors

Does npm run as root by default? I installed npm with pacman forever ago to test a project a friend was working on and then uninstalled with pacman immediately after. Also I found that one of the packages that was conflicting was the actual npm executable in /usr/bin so would this suggest that pacman didnt uninstall it correctly? I think you may be right though because one of the other packages I was having this issue with was python and if I remember pip does use root unless you tell it not to.

Last edited by demondog (2019-10-15 04:14:15)

Offline

#4 2019-10-15 10:54:26

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,415

Re: [SOLVED] Regularly getting "conflicting files" errors

Things run as root because you run them as root. And yes all of these tools will use system paths if invoked as root by default. If you get conflicting files errors then that means these files came from a different source than pacman. Pacman did uninstall correctly, but something you did lead to it being reinstated outside of pacman.

Last edited by V1del (2019-10-15 10:55:32)

Offline

#5 2019-10-15 14:04:11

xerxes_
Member
Registered: 2018-04-29
Posts: 662

Re: [SOLVED] Regularly getting "conflicting files" errors

I had the same problem when I run pip as root and install some python packages and had it til I removed manually every that package. So you have to remove it.

Don't run and install as root anything by things like pip, npm, cpan (anyone know what else package managers may be included in that list?) unless you want to manage it manually. Run and install by this package managers as unprivileged user.

Too bad you removed npm; mayby you could removed that packages by it, but now it's too late (config and database files are lost).

Maybe someone will post some safe script to remove files from different dirs from list in text file?

Last edited by xerxes_ (2019-10-15 14:06:52)

Offline

#6 2019-10-15 20:44:51

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,461

Re: [SOLVED] Regularly getting "conflicting files" errors

demondog wrote:

Does npm run as root by default? I installed npm with pacman forever ago to test a project a friend was working on and then uninstalled with pacman immediately after. Also I found that one of the packages that was conflicting was the actual npm executable in /usr/bin so would this suggest that pacman didnt uninstall it correctly? I think you may be right though because one of the other packages I was having this issue with was python and if I remember pip does use root unless you tell it not to.

If this is happening regularly, there are only 2 choices I can think of. Either you're regularly installing things into the root filesystem outside of pacman, or you have serious filesystem/disk problems.

Offline

#7 2019-10-16 02:45:24

demondog
Member
Registered: 2019-10-10
Posts: 8

Re: [SOLVED] Regularly getting "conflicting files" errors

Ok seems like this was definitely my own error. I'll be more mindful when using package managers other than pacman. Thanks for the help.

Last edited by demondog (2019-10-16 02:48:38)

Offline

Board footer

Powered by FluxBB