You are not logged in.

#1 2020-04-09 20:05:10

noednett
Member
Registered: 2020-04-09
Posts: 5

[SOLVED] Cannot upgrade pacman: gtk2 hook line 2: invalid value path

Hello everybody,

Sooo I'm quite a hobbyist when it comes to Arch. I only really use it when i have the necessary time to do so, since im quite a newbie at it.

So Today, i got back to using Arch for the first time in a quite a while and i tried upgrading via pacman, as you do, i suppose. But i ran into a problem while doing so. Whenever i tried upgrading a package, no matter what package, i got the following error:

~$ sudo pacman -S pacman
resolving dependencies...
looking for conflicting packages...

Packages (1) pacman-5.2.1-4

Total Installed Size:   4.41 MiB
Net Upgrade Size:      -0.19 MiB

:: Proceed with installation? [Y/n] Y
(1/1) checking keys in keyring                                         [#######################################] 100%
(1/1) checking package integrity                                       [#######################################] 100%
(1/1) loading package files                                            [#######################################] 100%
(1/1) checking for file conflicts                                      [#######################################] 100%
(1/1) checking available disk space                                    [#######################################] 100%
error: hook /usr/share/libalpm/hooks/gtk-query-immodules-2.0.hook line 2: invalid value Path
error: failed to commit transaction (failed to run transaction hooks)
Errors occurred, no packages were upgraded.

Now this happens, as i said, with any package i want to upgrade or install, even when trying to remove a package. I tried looking into the file mentioned in the error but i can't really tell, where the issue lies hmm

/usr/share/libalpm/hooks/gtk-query-immodules-2.0.hook :

[Trigger]
Type = Path
Operation = Install
Operation = Upgrade
Operation = Remove
Target = usr/lib/gtk-2.0/2.10.0/immodules/*.so

[Action]
Description = Probing GTK2 input method modules...
When = PostTransaction
Exec = /usr/bin/gtk-query-immodules-2.0 --update-cache 

Does anybody have an idea what i am missing here or what the issue migh be causing this error?

Last edited by noednett (2020-04-09 21:10:36)

Offline

#2 2020-04-09 20:19:51

seth
Member
Registered: 2012-09-03
Posts: 51,597

Re: [SOLVED] Cannot upgrade pacman: gtk2 hook line 2: invalid value path

You're trying to conduct a partial update (and probably did in the past)
/usr/share/libalpm/hooks/gtk-query-immodules-2.0.hook is provided by gtk2 and the proper "Type" is "File" (changed w/ the last release in late february, https://git.archlinux.org/svntogit/pack … 4ad5daffa2 )

Run "pacman -Syu". If you have to, try to only update gtk2 first or, as last resort, fix the file by hand.

Online

#3 2020-04-09 20:27:44

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Cannot upgrade pacman: gtk2 hook line 2: invalid value path

There should be no need to edit the hook file. All of my machines have the old hook, and I experience no issues upgrading. -Syu --debug would be useful.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2020-04-09 20:29:01

loqs
Member
Registered: 2014-03-06
Posts: 17,423

Re: [SOLVED] Cannot upgrade pacman: gtk2 hook line 2: invalid value path

pacman is complaining about the hook using Path meaning pacman is too old.

pacman -Qi pacman
pacman --version

Online

#5 2020-04-09 20:39:53

noednett
Member
Registered: 2020-04-09
Posts: 5

Re: [SOLVED] Cannot upgrade pacman: gtk2 hook line 2: invalid value path

So 'pacman -Syu' doesn't work, since there seems to be a dependency problem blocking it, which i tried to fix by removing the conflicting packages, which then lead me to this issue, giving me the exact same error. I  also tried updating only gtk2, which again, gave back the exact same error. I now ran -Syu --debug and got an almost endless output of depencdency checks, but which ended with the same dependency error i originally tried fixing, after it asked me if i wanted to replace compton with community/picom (both Y/n give the same outcome):

error: failed to prepare transaction (could not satisfy dependencies)
:: installing xorgproto (2019.2-2) breaks dependency 'dmxproto' required by libdmx
:: installing xorgproto (2019.2-2) breaks dependency 'xf86dgaproto' required by libxxf86dga

Offline

#6 2020-04-09 20:41:39

noednett
Member
Registered: 2020-04-09
Posts: 5

Re: [SOLVED] Cannot upgrade pacman: gtk2 hook line 2: invalid value path

Addition:

 pacman -Qi pacman
Name            : pacman
Version         : 5.1.3-1
Description     : A library-based package manager with dependency support
Architecture    : x86_64
URL             : https://www.archlinux.org/pacman/
Licenses        : GPL
Groups          : base  base-devel
Provides        : None
Depends On      : bash  glibc  libarchive  curl  gpgme  pacman-mirrorlist  archlinux-keyring
Optional Deps   : perl-locale-gettext: translation support in makepkg-template
                  xdelta3: delta support in repo-add
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 4.60 MiB
Packager        : Allan McRae <allan@archlinux.org>
Build Date      : Fri 01 Mar 2019 02:41:56 AM CET
Install Date    : Fri 06 Sep 2019 11:45:35 AM CEST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

and

pacman --version

 .--.                  Pacman v5.1.3 - libalpm v11.0.3
/ _.-' .-.  .-.  .-.   Copyright (C) 2006-2018 Pacman Development Team
\  '-. '-'  '-'  '-'   Copyright (C) 2002-2006 Judd Vinet
 '--'
                       This program may be freely redistributed under
                       the terms of the GNU General Public License.

Offline

#7 2020-04-09 20:41:46

seth
Member
Registered: 2012-09-03
Posts: 51,597

Re: [SOLVED] Cannot upgrade pacman: gtk2 hook line 2: invalid value path

https://www.archlinux.org/news/xorg-cle … ervention/

Edit: Also "pacman -Qi libarchive"

Last edited by seth (2020-04-09 20:42:16)

Online

#8 2020-04-09 20:47:49

noednett
Member
Registered: 2020-04-09
Posts: 5

Re: [SOLVED] Cannot upgrade pacman: gtk2 hook line 2: invalid value path

:/

pacman -Rdd libdmx libxxf86dga && pacman -Syu

Packages (2) libdmx-1.1.4-1  libxxf86dga-1.1.5-1

Total Removed Size:  0.18 MiB

:: Do you want to remove these packages? [Y/n] Y
error: hook /usr/share/libalpm/hooks/gtk-query-immodules-2.0.hook line 2: invalid value Path
error: failed to commit transaction (failed to run transaction hooks)

Offline

#9 2020-04-09 20:50:22

seth
Member
Registered: 2012-09-03
Posts: 51,597

Re: [SOLVED] Cannot upgrade pacman: gtk2 hook line 2: invalid value path

Yes. Your pacman version is too old.
You can use https://pkgbuild.com/~eschwartz/repo/x86_64-extracted/ to work around that and get your system up to date (rather than just editing the gtk hook, because there might be more issues)

Online

#10 2020-04-09 21:08:09

noednett
Member
Registered: 2020-04-09
Posts: 5

Re: [SOLVED] Cannot upgrade pacman: gtk2 hook line 2: invalid value path

okay thank you all very much, it worked out:

Dowloading pacman-static, then

chmod +x pacman-static
sudo ./pacman-static -Rdd libdmx libxxf86dga libxxf86misc
sudo ./pacman-static -Syu

did the trick.

Offline

#11 2020-04-13 22:01:50

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] Cannot upgrade pacman: gtk2 hook line 2: invalid value path

Note that this problem would never have happened if you had not somehow gotten into a partial upgrade state. The gtk2 package got updated with a newer version while the pacman package got held back. Only after that gtk2 upgrade completed did pacman stop working.

Using the pacman-static binary is a useful workaround, but you should endeavor to avoid partial updates anyway.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB