You are not logged in.

#1 2023-05-22 14:47:55

amixra
Member
Registered: 2022-01-24
Posts: 103

[Solved] call to execv failed (No such file or directory)

following is the snippet, occurred during updating

(13/30) Reloading system bus configuration...
(14/30) Warn about old perl modules
(15/30) e4rat-lite-git-update.hook
call to execv failed (No such file or directory)
error: command failed to execute correctly
(16/30) Updating fontconfig cache...
(17/30) Updating 32-bit fontconfig cache...
(18/30) Probing GDK-Pixbuf loader modules...

here is the e4rat-lite-git update hook

[Trigger]
Operation=Upgrade
Type=Package
Target=boost

[Action]
When=PostTransaction
Exec=echo 'NOTICE: Boost has been updated. Please re-build e4rat-lite-git.'
Depends=e4rat-lite-git                                                                                                                                                   

Last edited by amixra (2023-05-24 11:24:24)


Do experiment at-least.

Offline

#2 2023-05-22 14:50:51

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,463

Re: [Solved] call to execv failed (No such file or directory)

There's no shell, so there's no PATH. You need to specify the path to the executable.

Offline

#3 2023-05-22 14:54:26

amixra
Member
Registered: 2022-01-24
Posts: 103

Re: [Solved] call to execv failed (No such file or directory)

Scimmia wrote:

There's no shell, so there's no PATH. You need to specify the path to the executable.

This hook comes with package itself, may you be more verbose about your point?


Do experiment at-least.

Offline

#4 2023-05-22 15:06:07

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,444
Website

Re: [Solved] call to execv failed (No such file or directory)

Exec=/bin/echo 'Notice ...'

Though it's interesting that systemd's on man pages (e.g., systemd.service(5)) include examples with Exec=echo which would (wrongly?) imply that it uses execvp rather than execv.

EDIT: technically I suppose that's "ExecStart=" examples, but also notable that "Exec=" doesn't even seem to be a documented option (though there is an example in the man page using it).  Further, countless real examples show that ExecStart= does indeed use execvp (or does it's own path search which is less likely).  So this error seems to be a combination of using a binary name without a path and using an undocumented "Exec=" directive in place of what should be "ExecStart=".  So the real solution would almost certainly instead be the following:

ExecStart=echo 'Notice ...'

Last edited by Trilby (2023-05-22 15:36:33)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#5 2023-05-24 09:57:26

amixra
Member
Registered: 2022-01-24
Posts: 103

Re: [Solved] call to execv failed (No such file or directory)

I can't verify it just after making the change but hoping that it would work.


Do experiment at-least.

Offline

#6 2023-05-24 10:42:12

amixra
Member
Registered: 2022-01-24
Posts: 103

Re: [Solved] call to execv failed (No such file or directory)

No, I was able to verify. It didn't worked

error: hook /usr/share/libalpm/hooks/e4rat-lite-git-update.hook line 8: invalid option ExecStart
error: failed to commit transaction (failed to run transaction hooks)

Last edited by amixra (2023-05-24 10:42:59)


Do experiment at-least.

Offline

#7 2023-05-24 10:57:10

amixra
Member
Registered: 2022-01-24
Posts: 103

Re: [Solved] call to execv failed (No such file or directory)

It works with EXEC=/bin/echo

(2/5) e4rat-lite-git-update.hook
NOTICE: Boost has been updated. Please re-build e4rat-lite-git.

Do experiment at-least.

Offline

#8 2023-05-24 12:01:08

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,444
Website

Re: [Solved] call to execv failed (No such file or directory)

Oops! Sorry, this is an alpm-hook not a systemd service file.  They have fairly similar looking ini-syntax but are completely different things.  So (most of) my previous comments are irrelevant: a full path is the only relevant requirement.

Last edited by Trilby (2023-05-24 12:01:16)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

Board footer

Powered by FluxBB