You are not logged in.

#1 2021-01-13 12:10:22

dantakka
Member
Registered: 2018-03-25
Posts: 11

[SOLVED] Replaced my /usr directory and now having issues with pacman

A few weeks ago I made a mistake by deciding to replace the whole /usr directory with a backup from a few days before that. Since then I am having various issues with pacman and some packages. Today I did a full system upgrade, but when I rebooted some programs did not want to start, e.g.

Guake not running, starting it
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/dbus/bus.py", line 177, in activate_name_owner
    return self.get_name_owner(bus_name)
  File "/usr/lib/python3.9/site-packages/dbus/bus.py", line 361, in get_name_owner
    return self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
  File "/usr/lib/python3.9/site-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.guake3.RemoteControl': no such name

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/guake/main.py", line 452, in main
    remote_object = bus.get_object(DBUS_NAME, DBUS_PATH)
  File "/usr/lib/python3.9/site-packages/dbus/bus.py", line 241, in get_object
    return self.ProxyObjectClass(self, bus_name, object_path,
  File "/usr/lib/python3.9/site-packages/dbus/proxies.py", line 250, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python3.9/site-packages/dbus/bus.py", line 182, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python3.9/site-packages/dbus/bus.py", line 277, in start_service_by_name
    return (True, self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
  File "/usr/lib/python3.9/site-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.guake3.RemoteControl was not provided by any .service files

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/guake", line 10, in <module>
    sys.exit(exec_main())
  File "/usr/lib/python3.9/site-packages/guake/main.py", line 614, in exec_main
    if not main():
  File "/usr/lib/python3.9/site-packages/guake/main.py", line 466, in main
    from guake.guake_app import Guake
  File "/usr/lib/python3.9/site-packages/guake/guake_app.py", line 56, in <module>
    from guake.about import AboutDialog
  File "/usr/lib/python3.9/site-packages/guake/about.py", line 28, in <module>
    from guake.common import gladefile
  File "/usr/lib/python3.9/site-packages/guake/common.py", line 30, in <module>
    from guake.paths import GLADE_DIR
  File "/usr/lib/python3.9/site-packages/guake/paths.py", line 26, in <module>
    from pkg_resources import Requirement
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3239, in <module>
    def _initialize_master_working_set():
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3222, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3251, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 558, in _build_master
    ws = cls()
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 551, in __init__
    self.add_entry(entry)
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 607, in add_entry
    for dist in find_distributions(entry, True):
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 2060, in find_on_path
    for dist in factory(fullpath):
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 2118, in distributions_from_metadata
    if len(os.listdir(path)) == 0:
PermissionError: [Errno 13] Permission denied: '/usr/lib/python3.9/site-packages/websocket_client-0.57.0.dist-info'

After that, everything I ran with pacman returned:

:: File /var/cache/pacman/pkg/[filenames].pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n]

I added "SigLevel = Never" to /etc/pacman.conf and changed my mirrors with the Arch Linux Archive to a date before I replaced my /usr directory (roughly 1 month ago.) Then I tried to update but it said that some files in /usr already exist and exited with an error.

error: failed to commit transaction (conflicting files)
gmp: /usr/lib/libgmp.so.10.4.0 exists in filesystem
gmp: /usr/lib/libgmpxx.so.4.6.0 exists in filesystem
libgpg-error: /usr/lib/libgpg-error.so.0.30.0 exists in filesystem
libarchive: /usr/lib/libarchive.so.13.5.0 exists in filesystem
libproxy: /usr/lib/libproxy/0.4.16/modules/config_gnome3.so exists in filesystem
libproxy: /usr/lib/libproxy/0.4.16/modules/config_kde.so exists in file
libproxy: /usr/lib/libproxy/0.4.16/modules/config_pacrunner.so exists in filesystem
autoconf: /usr/share/man/man1/config.guess.1.gz exists in filesystem
autoconf: /usr/share/man/man1/config.sub.1.gz exists in filesystem
libmpc: /usr/lib/libmpc.so.3.1.0 exists in filesystem
libmicrohttpd: /usr/lib/libmicrohttpd.so.12.56.0 exists in filesystem
git: /usr/lib/git-core/git-parse-remote exists in filesystem
git: /usr/share/man/man1/git-parse-remote.1.gz exists in filesystem
python-msgpack: /usr/lib/python3.9/site-packages/msgpack-1.0.0-py3.9.egg-info/PKG-INFO exists in filesystem
python-msgpack: /usr/lib/python3.9/site-packages/msgpack-1.0.0-py3.9.egg-info/SOURCES.txt exists in filesystem
python-msgpack: /usr/lib/python3.9/site-packages/msgpack-1.0.0-py3.9.egg-info/dependency_links.txt exists in filesystem
python-msgpack: /usr/lib/python3.9/site-packages/msgpack-1.0.0-py3.9.egg-info/top_level.txt exists in filesystem
python-resolvelib: /usr/lib/python3.9/site-packages/resolvelib-0.5.3-py3.9.egg-info/PKG-INFO exists in filesystem
python-resolvelib: /usr/lib/python3.9/site-packages/resolvelib-0.5.3-py3.9.egg-info/SOURCES.txt exists in filesystem
python-resolvelib: /usr/lib/python3.9/site-packages/resolvelib-0.5.3-py3.9.egg-info/dependency_links.txt exists in filesystem
python-resolvelib: /usr/lib/python3.9/site-packages/resolvelib-0.5.3-py3.9.egg-info/not-zip-safe exists in filesystem
python-resolvelib: /usr/lib/python3.9/site-packages/resolvelib-0.5.3-py3.9.egg-info/requires.txt exists in filesystem
python-resolvelib: /usr/lib/python3.9/site-packages/resolvelib-0.5.3-py3.9.egg-info/top_level.txt exists in filesystem
youtube-dl: /usr/lib/python3.9/site-packages/youtube_dl/extractor/__pycache__/fxnetworks.cpython-39.opt-1.pyc exists in filesystem
youtube-dl: /usr/lib/python3.9/site-packages/youtube_dl/extractor/__pycache__/fxnetworks.cpython-39.pyc exists in filesystem
youtube-dl: /usr/lib/python3.9/site-packages/youtube_dl/extractor/fxnetworks.py exists in filesystem
Errors occurred, no packages were upgraded.system

Next I was going to add --overwrite option and try to upgrade, but I stopped by reading that I should avoid it unless explicitly recommended by the Arch developers. https://wiki.archlinux.org/index.php/Sy … n_commands

Ever since I replaced my /usr directory I have been getting these "[filename] exists in filesystem". But when I reinstall the package for the second time the warning disappears. I have a feeling that if I wait a bit more I won't be able to boot my system in the following weeks. What should I do? Should I upgrade with --overwrite?

My current pacman.conf:

#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives

#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir     = /
#DBPath      = /var/lib/pacman/
#CacheDir    = /var/cache/pacman/pkg/
#LogFile     = /var/log/pacman.log
#GPGDir      = /etc/pacman.d/gnupg/
#HookDir     = /etc/pacman.d/hooks/
HoldPkg     = pacman glibc
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
#UseDelta    = 0.7
Architecture = auto

# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
IgnorePkg   = audacious audacious-plugins emacs
#IgnoreGroup =

#NoUpgrade   =
#NoExtract   =

# Misc options
#UseSyslog
#Color
#TotalDownload
CheckSpace
#VerbosePkgLists

# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel    = Never
#SigLevel    = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required

# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux
# packagers with `pacman-key --populate archlinux`.

#
# REPOSITORIES
#   - can be defined here or included from another file
#   - pacman will search repositories in the order defined here
#   - local/custom mirrors can be added here or in separate files
#   - repositories listed first will take precedence when packages
#     have identical names, regardless of version number
#   - URLs will have $repo replaced by the name of the current repo
#   - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
#       [repo-name]
#       Server = ServerName
#       Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#

# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.

#[testing]
#Include = /etc/pacman.d/mirrorlist

[core]
Include = /etc/pacman.d/mirrorlist

[extra]
Include = /etc/pacman.d/mirrorlist

#[community-testing]
#Include = /etc/pacman.d/mirrorlist

[community]
Include = /etc/pacman.d/mirrorlist

# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.

#[multilib-testing]
#Include = /etc/pacman.d/mirrorlist

[multilib]
Include = /etc/pacman.d/mirrorlist

# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

Last edited by dantakka (2021-01-13 16:54:41)

Offline

#2 2021-01-13 13:01:26

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [SOLVED] Replaced my /usr directory and now having issues with pacman

You should be able to fix this by reinstalling all your packages. I had to do this myself in the past after I made a terrible mistake once (I had deleted /usr/share).

I don't know what to do about the .pkg.tar.* files in /var/cache/pacman/pkg/. I guess I'd delete them all so that pacman downloads fresh versions. I would switch back to the normal Arch mirrors to work on this, I wouldn't use the Arch Linux Archive server.

If pacman doesn't run from within your Arch installation, you can use the pacman from the Arch ISO to work on your installed system. Pacman has "--sysroot" and "--root" arguments to work on a mounted installation. You mount your installation into /mnt and then /mnt/boot, then do "pacman --sysroot /mnt" or if that has problems then try "pacman --root /mnt". The --sysroot argument will chroot into the path so might then be broken in the same way as your installed pacman is.

Things that might help in your battle:

There are "pacman -Qkk" and "paccheck --list-broken --md5sum" commands to try to hunt down corrupted files. The 'paccheck' tool is in the package named "pacutils".

There's a "lostfiles" tool to hunt down extra files that don't belong to any package. The tool shows a lot of false-positives here for me so you need to be careful with its output.

Offline

#3 2021-01-13 15:11:25

dantakka
Member
Registered: 2018-03-25
Posts: 11

Re: [SOLVED] Replaced my /usr directory and now having issues with pacman

Ropid wrote:

You should be able to fix this by reinstalling all your packages. I had to do this myself in the past after I made a terrible mistake once (I had deleted /usr/share).

I don't know what to do about the .pkg.tar.* files in /var/cache/pacman/pkg/. I guess I'd delete them all so that pacman downloads fresh versions. I would switch back to the normal Arch mirrors to work on this, I wouldn't use the Arch Linux Archive server.

If pacman doesn't run from within your Arch installation, you can use the pacman from the Arch ISO to work on your installed system. Pacman has "--sysroot" and "--root" arguments to work on a mounted installation. You mount your installation into /mnt and then /mnt/boot, then do "pacman --sysroot /mnt" or if that has problems then try "pacman --root /mnt". The --sysroot argument will chroot into the path so might then be broken in the same way as your installed pacman is.

Things that might help in your battle:

There are "pacman -Qkk" and "paccheck --list-broken --md5sum" commands to try to hunt down corrupted files. The 'paccheck' tool is in the package named "pacutils".

There's a "lostfiles" tool to hunt down extra files that don't belong to any package. The tool shows a lot of false-positives here for me so you need to be careful with its output.

Thank you for your reply! Reinstalling all packages with "pacman -Qqn | pacman -S -" (from https://wiki.archlinux.org/index.php/Pa … l_packages) fixed all the warnings and corrupted packages. The only problem I still have left is that when starting some applications, e.g. Guake, it still shows multiple errors. Would it be safe to "sudo rm -rf /usr/lib/python3.9/" from shell and reinstall all packages again?

Guake not running, starting it
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/dbus/bus.py", line 177, in activate_name_owner
    return self.get_name_owner(bus_name)
  File "/usr/lib/python3.9/site-packages/dbus/bus.py", line 361, in get_name_owner
    return self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
  File "/usr/lib/python3.9/site-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.guake3.RemoteControl': no such name

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/guake/main.py", line 452, in main
    remote_object = bus.get_object(DBUS_NAME, DBUS_PATH)
  File "/usr/lib/python3.9/site-packages/dbus/bus.py", line 241, in get_object
    return self.ProxyObjectClass(self, bus_name, object_path,
  File "/usr/lib/python3.9/site-packages/dbus/proxies.py", line 250, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python3.9/site-packages/dbus/bus.py", line 182, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python3.9/site-packages/dbus/bus.py", line 277, in start_service_by_name
    return (True, self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
  File "/usr/lib/python3.9/site-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.guake3.RemoteControl was not provided by any .service files

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/guake", line 10, in <module>
    sys.exit(exec_main())
  File "/usr/lib/python3.9/site-packages/guake/main.py", line 614, in exec_main
    if not main():
  File "/usr/lib/python3.9/site-packages/guake/main.py", line 466, in main
    from guake.guake_app import Guake
  File "/usr/lib/python3.9/site-packages/guake/guake_app.py", line 56, in <module>
    from guake.about import AboutDialog
  File "/usr/lib/python3.9/site-packages/guake/about.py", line 28, in <module>
    from guake.common import gladefile
  File "/usr/lib/python3.9/site-packages/guake/common.py", line 30, in <module>
    from guake.paths import GLADE_DIR
  File "/usr/lib/python3.9/site-packages/guake/paths.py", line 26, in <module>
    from pkg_resources import Requirement
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3239, in <module>
    def _initialize_master_working_set():
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3222, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3251, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 558, in _build_master
    ws = cls()
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 551, in __init__
    self.add_entry(entry)
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 607, in add_entry
    for dist in find_distributions(entry, True):
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 2060, in find_on_path
    for dist in factory(fullpath):
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 2118, in distributions_from_metadata
    if len(os.listdir(path)) == 0:
PermissionError: [Errno 13] Permission denied: '/usr/lib/python3.9/site-packages/websocket_client-0.57.0.dist-info'

Offline

#4 2021-01-13 16:54:22

dantakka
Member
Registered: 2018-03-25
Posts: 11

Re: [SOLVED] Replaced my /usr directory and now having issues with pacman

Alright, I moved "/usr/lib/python3.9" to "/usr/lib/python3.9.old", then I reinstalled everything again with "pacman -Qqn | pacman -S -" and all my Python problems are now resolved! Thank you!

Offline

Board footer

Powered by FluxBB