You are not logged in.

#1 2023-12-04 21:20:33

user9344
Member
Registered: 2023-12-04
Posts: 4

build failed caused by "Not a directory"

I'm not able to run anything with pacman because anytime I do I get this error.

error: could not open directory: /etc/pacman.d/hooks/: Not a directory
error: failed to commit transaction (failed to run transaction hooks)

Thank you in advance

Offline

#2 2023-12-04 21:42:37

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

Re: build failed caused by "Not a directory"

If /etc/pacman.d/hooks is not a directory what is it?  `stat /etc/pacman.d/hooks`  I would suggest whatever it is at least renaming it.

Last edited by loqs (2023-12-04 21:42:56)

Offline

#3 2023-12-04 21:47:01

user9344
Member
Registered: 2023-12-04
Posts: 4

Re: build failed caused by "Not a directory"

loqs wrote:

If /etc/pacman.d/hooks is not a directory what is it?  `stat /etc/pacman.d/hooks`  I would suggest whatever it is at least renaming it.

thanks for the quick response, yeah it is /etc/pacman.d/hooks, that being said i am i complete noob at linux and im not sure how to switch the two

Offline

#4 2023-12-04 21:49:52

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

Re: build failed caused by "Not a directory"

See mv.1

Offline

#5 2023-12-04 22:07:35

user9344
Member
Registered: 2023-12-04
Posts: 4

Re: build failed caused by "Not a directory"

loqs wrote:

See mv.1

$ mv /etc/pacman.d/hooks /etc/pacman.d/hooks/
mv: cannot stat '/etc/pacman.d/hooks/': Not a directory
stat /etc/pacman.d/hooks
  File: /etc/pacman.d/hooks
  Size: 497             Blocks: 8          IO Block: 4096   regular file
Device: 8,3     Inode: 2374367     Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1000/    resu)   Gid: ( 1000/    resu)
Access: 2023-12-03 14:53:13.213926112 -0500
Modify: 2023-12-03 13:06:13.738048998 -0500
Change: 2023-12-03 13:31:47.818009427 -0500
 Birth: 2023-12-03 13:06:13.738048998 -0500

Last edited by user9344 (2023-12-05 00:46:33)

Offline

#6 2023-12-05 08:01:10

seth
Member
Registered: 2012-09-03
Posts: 48,344

Re: build failed caused by "Not a directory"

mv: cannot stat '/etc/pacman.d/hooks/': Not a directory

So you didn't read the mv manpage?

cat /etc/pacman.d/hooks
sudo mv /etc/pacman.d/hooks ~/whateverthefuckthatwas

i am i complete noob at linux

And so what arch derivate are you using?

Offline

#7 2023-12-08 23:23:30

user9344
Member
Registered: 2023-12-04
Posts: 4

Re: build failed caused by "Not a directory"

seth wrote:

mv: cannot stat '/etc/pacman.d/hooks/': Not a directory

So you didn't read the mv manpage?


cat /etc/pacman.d/hooks
sudo mv /etc/pacman.d/hooks ~/whateverthefuckthatwas

i am i complete noob at linux

And so what arch derivate are you using?

i did read the page, but i dont understand how im supposed to rename hooks to hooks/ or if i need to do something else
also im not on a derivate of arch

Last edited by user9344 (2023-12-08 23:24:06)

Offline

#8 2023-12-09 01:55:10

kiyafirs
Member
Registered: 2023-10-18
Posts: 2

Re: build failed caused by "Not a directory"

To rename something with mv you should write "mv old-name new-name".

Offline

#9 2023-12-09 02:22:03

kiyafirs
Member
Registered: 2023-10-18
Posts: 2

Re: build failed caused by "Not a directory"

kiyafirs wrote:

To rename something with mv you should write "mv old-name new-name".

Sorry, I wrote it without thinking. Don't think it will help in turning file into directory.

Offline

#10 2023-12-09 08:03:59

seth
Member
Registered: 2012-09-03
Posts: 48,344

Re: build failed caused by "Not a directory"

also im not on a derivate of arch

You don't know how mv works and there's some bogus file that's not supposed to be there  at all.
There's no way in hell you ever managed to install archlinux yourself.
This is a derivate or you used a stupid script or followed some idiot on youtube to install the system. Same thing.

i dont understand how im supposed to rename hooks to hooks/

You cannot move/rename files into being directories, something the mv error also made overly clear.
So mv it into some other file and post the file contents so maybe we can get an idea whatever the fuck that was to begin with.

The /etc/pacman.d/hooks/ directory doesn't have to be there and isn't by default.

Offline

Board footer

Powered by FluxBB