You are not logged in.

#1 2022-08-05 11:02:09

BlackJillo
Member
Registered: 2022-08-05
Posts: 5

How to exclude a dependency?

i am trying to install a lot of packages at the same time, and am getting this error at the end of the download.

"error: failed to commit transaction (conflicting files)
/usr/lib/python3.10/site-packages/magic/__init__.py exists in both 'python-magic' and 'python-filemagic'
/usr/lib/python3.10/site-packages/magic/__pycache__/__init__.cpython-310.opt-1.pyc exists in both 'python-magic' and 'python-filemagic'
/usr/lib/python3.10/site-packages/magic/__pycache__/__init__.cpython-310.pyc exists in both 'python-magic' and 'python-filemagic'
Errors occurred, no packages were upgraded.
"

how do i exclude one of the 2 packages that are conflicting to complete the download successfully?

(both the "python-filemagic" and "python-magic" aren't packages that am trying to download, i assume they are dependencies of one of the packages am trying to download but i cannot figure out which one it is either.

imageOfError

Last edited by BlackJillo (2022-08-05 11:06:48)

Offline

#2 2022-08-05 11:16:17

Scimmia
Fellow
Registered: 2012-09-01
Posts: 9,447

Re: How to exclude a dependency?

On what OS? There is no package called python-filemagic in Arch.

Offline

#3 2022-08-05 11:27:16

BlackJillo
Member
Registered: 2022-08-05
Posts: 5

Re: How to exclude a dependency?

does pre-installing one of them before installing the package list that am trying to download fix this? am on arch

Offline

#4 2022-08-05 11:28:13

Scimmia
Fellow
Registered: 2012-09-01
Posts: 9,447

Re: How to exclude a dependency?

Then where, exactly, is python-filemagic coming from?

Offline

#5 2022-08-05 11:29:13

BlackJillo
Member
Registered: 2022-08-05
Posts: 5

Re: How to exclude a dependency?

i have no idea to be honest, am downloading a package list from a file, i tried searching in the file for anything python related by name. and i couldnt find anything

Offline

#6 2022-08-05 11:30:01

BlackJillo
Member
Registered: 2022-08-05
Posts: 5

Re: How to exclude a dependency?

now after downloading i get this error

"error: failed to commit transaction (conflicting files)
python-magic: /usr/lib/python3.10/site-packages/magic/__init__.py exists in filesystem (owned by python-filemagic)
python-magic: /usr/lib/python3.10/site-packages/magic/__pycache__/__init__.cpython-310.opt-1.pyc exists in filesystem (owned by python-filemagic)
python-magic: /usr/lib/python3.10/site-packages/magic/__pycache__/__init__.cpython-310.pyc exists in filesystem (owned by python-filemagic)
Errors occurred, no packages were upgraded.
"

Offline

#7 2022-08-05 11:31:00

Scimmia
Fellow
Registered: 2012-09-01
Posts: 9,447

Re: How to exclude a dependency?

Yeah, that was never going to work.

Give us your pacman.conf and your mirrorlist.

Offline

#8 2022-08-05 11:36:43

BlackJillo
Member
Registered: 2022-08-05
Posts: 5

Re: How to exclude a dependency?

i fixed it by adding the argument `--overwrite`

`sudo pacman -Syyu --needed --overwrite='*' <wanted-package>`

Offline

#9 2022-08-05 11:37:44

Scimmia
Fellow
Registered: 2012-09-01
Posts: 9,447

Re: How to exclude a dependency?

That's not a solution, that just created a mess.

Offline

#10 2022-08-05 14:35:07

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 18,648

Re: How to exclude a dependency?

Scimmia wrote:

Yeah, that was never going to work.

Give us your pacman.conf and your mirrorlist.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#11 2022-08-05 16:50:59

teckk
Member
Registered: 2013-02-21
Posts: 457

Re: How to exclude a dependency?

The only place I see that is here:
https://pypi.org/project/filemagic/

Have you been installing python modules with pip into the file tree?

python-magic is in the repo.

Or, like Scimma/ewaller said, are you using a non official repo? And installed python-filemagic from that repo with pacman?

Seems like the solution would be to uninstall python-filemagic. If you need that, then get the source, make a PKGBUILD for it, make a package with makepkg, install it with pacman.

https://github.com/aliles/filemagic

Offline

#12 2022-08-05 21:39:09

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 27,079
Website

Re: How to exclude a dependency?

teckk wrote:

The only place I see that is here...

You clearly didn't look in the repos of several arch-based distros.  Installing via pip is not relevant here as that could create files that would conflict, but pacman wouldn't report the package as being in conflict as those files wouldn't belong to a package.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB