fix error while loading shared libraries
"cannot open shared object file": a program needs a library that is missing or not where it looks.
developmentpackages
-
ldd /path/to/programevery library it needs; the missing ones say "not found"
-
ldconfig -p | grep libNAMEis the library known to the system?
-
apt-file search libNAME.so.1the package that has it (Debian, Ubuntu; dnf provides on Fedora)
-
sudo ldconfigafter installing a library in /usr/local/lib, let the system find it
-
LD_LIBRARY_PATH=/opt/app/lib /path/to/programrun it with an extra folder to look in
lddldconfigapt-file
Each has a page in lore: lore ldd opens it.
ask for input in a script
Ask yes or no, read a password without showing it, or wait for an answer with a time limit.
check if a file or folder exists
Test in a script whether a path exists, is a file, a folder, empty or runnable.
check if a program is installed
Find whether a command exists, where it is, and which package it came from.
check if a string contains a text
Test in a script whether a string contains, starts with or matches something.