root@ubuntu:~# dpkg -S /bin/ls dpkg-query: no path found matching pattern /bin/ls why it…
- User
root@ubuntu:~# dpkg -S /bin/ls dpkg-query: no path found matching pattern /bin/ls why it doesn`t work
- Assistant
The error message indicates that the
dpkgcommand could not find the file/bin/lsin the package database. This can happen for several reasons:-
File Not Installed: The
lscommand might not be installed on your system. In Debian-based systems like Ubuntu,lsis typically provided by thecoreutilspackage. You can check if it's installed with:bashdpkg -l | grep coreutils -
File Missing: If the
coreutilspackage is installed, the/bin/lsfile might be missing or corrupted. You can try reinstalling thecoreutilspackage with:bash
-