As root I get the following error
mksh: pkg: inaccesible or not found
env: pkg: No such file or directory
Switching to sh(1) somehow solves the issue
screen-4.8.0 Multi-screen window manager
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.
# 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.