I've been experimenting on many repeated installs of OpenWrt and there is this peculiar situation that I keep stumbling upon. Many times, I was trying to call 'lsblk' from either the terminal on Pi4 or via SSH. In some new installation sometime 'lsblk' will be present and run OK, other times I will simply get an error message:
lsblk: not found
Is there an operation that I can perform to install the package that include 'lsblk' ?
Why is it present only sometimes ?
Above is the output I got from the SSH Terminal on OpenWrt.
I'm running OpenWrt on a Pi4 2Gb and a 16Gb sdcard.
Fresh installed with minor mods to extend the full access of the sdcard. took instructions from a video on YT.
thanks for your help.
The feeds file looks fine, did the opkg update produce the expected output? Something like this:
$ opkg update
Downloading https://downloads.openwrt.org/releases/23.05.2/targets/x86/64/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading https://downloads.openwrt.org/releases/23.05.2/targets/x86/64/packages/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/x86_64/base/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/x86_64/base/Packages.sig
Signature check passed.
... a dozen more lines like above ...
I really have no clue what the issue is, we simply reproduced what opkg does when you do a normal install using a package name... I selected that directory right out of your opkg feeds, found the package starting with lsblk and grabbed the link to it.
The usual suspects are
DNS not working, which causes opkg update to fail with "error 4" or something like that (plus that wget from openwrt.org won't work without DNS, either);
The package build is failing and the package does not exist on the download server, but that's very rare for a release build and 23.05.2 is very stable at this point.
Oh, just had a thought! This is very unlikely, but maybe the package database is corrupted. Do these steps and see if it works:
Remove the package lists (the rm).
Restore the package lists (the update).
See if some package you don't have is available (the info).
Try to install it, I picked lscpu, but anything you like is fine.
$ rm /tmp/opkg-lists/*
$ opkg update
$ opkg -A info lscpu
$ opkg install lscpu
Some 12 files in that folder. Deleted them all and opkg update.
Then they all came back.
opkg -A info lscpu worked fine before and after update
opkg install lscpu worked fine also.