Unable to run pkg(8) - a mksh(1) or kernel quirk?

Steen E

New Member


Messages: 2

As root I get the following error
# pkg search screen-4.8.0
mksh: pkg: inaccesible or not found
# env -i pkg search screen-4.8.0
env: pkg: No such file or directory

Switching to sh(1) somehow solves the issue
# env -i /bin/sh -c "pkg search screen-4.8.0"
screen-4.8.0 Multi-screen window manager
# pkg search screen-4.8.0
screen-4.8.0 Multi-screen window manager

The current system is FreeBSD 12.2 with a custom kernel. The console is vt(4) without a KMS driver. The problem happened after a new kernel. I think the kernel compile is the most likely cause - the kernel config is a mess and I'll be correcting it right now.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 9,512
Messages: 34,309

mksh: pkg: inaccesible or not found
Looks like an issue with your PATH. Your PATH is probably incorrect, while it's correct for sh(1). Has nothing to do with your kernel.
 
OP
S

Steen E

New Member


Messages: 2

No. The above cli lines actually happened just so. I'm not able to take a screenschot, but still has the console preserved. From a previous session I also used ktrace(1) and wrote a description, see attached plaintext file buglog.txt. That session 'showcase' a different quirk where the issue is solved by root calling su(1) <some_user_also_using_mksh>.
 

Attachments

  • buglog.txt
    5.9 KB · Views: 10

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 9,512
Messages: 34,309

From a previous session I also used ktrace(1) and wrote a description, see attached plaintext file buglog.txt.
Like [USER=6335]ljboiler[/USER] said, it's pkg not pgk. You've traced a typo.
 
Top