Failed to commit transaction "hook /etc/pacman.d/hooks/pamac.hook line 10: invalid value"

I'm getting this error when I try to install updates:

Synchronizing package databases...
Resolving dependencies...
Checking inter-conflicts...
Checking keyring...
Checking integrity...
Loading packages files...
Checking file conflicts...
Checking available disk space...
Error: hook /etc/pacman.d/hooks/pamac.hook line 10: invalid value /bin/sh -c "zcat /usr/share/app-info/xmls/community.xml.gz | sed 's|<em>||g;s|<\/em>||g;' | gzip > "new.xml.gz"
Failed to commit transaction: failed to run transaction hooks

-Thanks

1 Like
sudo rm /etc/pacman.d/hooks/pamac.hook
sudo pacman -Sy garuda-hooks

then it will work afterwards

7 Likes

Thanks :grin:

See? That's where I want to be... how do you know what the problem and the solution is? My reasoning would've been to open that file (if it were possible) and check what is wrong with line 10 (not that the string sed 's|<em>||g;s|<\/em>||g;' would have been understandable to me). Instead, you just make me remove pamac.hook and I'm golden.

5 Likes

That's because he knows a thing or two about a thing or two. :wink: :smile:

5 Likes

I updated Garuda yesterday, after not running upgrades since the 1st of this month. Now, when I try to run pacman/upgrade I am seeing the following error:

error: hook /etc/pacman.d/hooks/pamac.hook line 10: invalid value /bin/sh -c "zcat /usr/share/app-info/xmls/community.xml.gz | sed 's|<em>||g;s|<\/em>||g;' | gzip > "new.xml.gz"
error: failed to commit transaction (failed to run transaction hooks)
Errors occurred, no packages were upgraded.

I've searched google, cant find anything on this particular error, and I am quite new to arch so I am unable to identify it. I rolled back to a snapshot before the update, tried updating again and am seeing the same message.

Checking available disk space...

Error: hook /etc/pacman.d/hooks/pamac.hook line 10: invalid value /bin/sh -c "zcat /usr/share/app-info/xmls/community.xml.gz | sed 's|||g;s|</em>||g;' | gzip > "new.xml.gz"
Failed to commit transaction:
failed to run transaction hooks

the answer is here in forum more then two times :wink:

Also in this thread :smiley: Sometimes I hate my tablet :wink:

3 Likes