You are not logged in.

#1 2024-02-10 15:50:20

Bqyden
Member
Registered: 2024-02-10
Posts: 3

[SOLVED] Pacman cannot open the `hooks` directory

I'd consider myself fairly new to linux, but especially to arch. after trying to update packages with `sudo pacman -Syu`, the package manager returns an error that it cannot open a directory to `hooks/`. I've never messed with anything associated with pacman, so I'm just confused why the directory isn't there to begin with.

as a seemingly important note:
I do have a file titled `hooks` in the directory `etc/pacman.d` which is populated, but no folder.

Last edited by Bqyden (2024-02-11 13:35:25)

Offline

#2 2024-02-10 15:56:01

seth
Member
Registered: 2012-09-03
Posts: 52,327

Re: [SOLVED] Pacman cannot open the `hooks` directory

I do have a file titled `hooks` in the directory `etc/pacman.d` which is populated, but no folder.

And why is that there?

stat /etc/pacman.d/hooks # the creation date might tell you something
pacman -Qo /etc/pacman.d/hooks # this better be "no package owns this nonsense"

Offline

#3 2024-02-10 16:24:43

Bqyden
Member
Registered: 2024-02-10
Posts: 3

Re: [SOLVED] Pacman cannot open the `hooks` directory

ah, thank you!

`stat` says the birth date is 02-05, just a couple days after I first installed arch
`pacman -Qo /etc/pacman.d/hooks` thankfully does return that no packages own the file

Offline

#4 2024-02-10 16:40:00

seth
Member
Registered: 2012-09-03
Posts: 52,327

Re: [SOLVED] Pacman cannot open the `hooks` directory

Ok, simply remove it.

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#5 2024-02-10 16:57:53

Bqyden
Member
Registered: 2024-02-10
Posts: 3

Re: [SOLVED] Pacman cannot open the `hooks` directory

alright, I will delete the file. but what about the missing directory? should I make the folder myself? will pacman recognize it's missing and make a new one?

Offline

#6 2024-02-10 17:00:53

seth
Member
Registered: 2012-09-03
Posts: 52,327

Re: [SOLVED] Pacman cannot open the `hooks` directory

You're not missing anything there - packages will put hooks into /usr/share/libalpm/hooks
If you want to add your own hooks to /etc (or shadow repo hooks there, no idea whether that works, though), you'll of course have to create the directory, yes.

Offline

#7 2024-02-10 17:12:25

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

Re: [SOLVED] Pacman cannot open the `hooks` directory

seth wrote:

If you want to add your own hooks to /etc (or shadow repo hooks there, no idea whether that works, though).

It does at least for overriding. Not tested sym-linking to /dev/null.

Offline

Board footer

Powered by FluxBB