You are not logged in.

#1 2019-10-29 18:16:17

tbhaxor
Member
Registered: 2019-10-18
Posts: 2

Unable to overwrite directory in Pacman

I am about to install a package, but it keeps failing because the file already exists. Since --force option is removed from pacman. I have been trying to overwrite the directory by --overwrite option but unfortunately, this option is also not working

Command I ran:

sudo pacman -S namcap --overwrite /usr/lib/python3.7/site-packages/elftools/elf/*
Conflicting Files
....
python-pyelftools: /usr/lib/python3.7/site-packages/elftools/elf/notes.py exists in filesystem
python-pyelftools: /usr/lib/python3.7/site-packages/elftools/elf/relocation.py exists in filesystem
python-pyelftools: /usr/lib/python3.7/site-packages/elftools/elf/sections.py exists in filesystem
python-pyelftools: /usr/lib/python3.7/site-packages/elftools/elf/segments.py exists in filesystem
python-pyelftools: /usr/lib/python3.7/site-packages/elftools/elf/structs.py exists in filesystem

Offline

#2 2019-10-29 18:20:45

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Unable to overwrite directory in Pacman

tbhaxor wrote:
sudo pacman -S namcap --overwrite /usr/lib/python3.7/site-packages/elftools/elf/*

Get rid of the leading /

I believe that you actually need to glob for files in the package archive rather than the final location.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2019-10-29 18:25:02

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: Unable to overwrite directory in Pacman

Maybe quote the path glob so the shell doesn't try to expand it?

sudo pacman -S --overwrite "/usr/lib/python3.7/site-packages/elftools/elf/*" namcap 

Edit: Or what Slithery said.

Edit: If you installed pyelftools using pip, then please uninstall and retry your pacman command without overwrite instead.

Arch Wiki wrote:

https://wiki.archlinux.org/index.php/Py … management

If you must use pip, use a virtual environment, or pip install --user to avoid conflicts with packages in /usr. It is always preferred to use pacman to install software.

Last edited by progandy (2019-10-29 18:33:13)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

Board footer

Powered by FluxBB