What it means: the system couldn't find your directory.
Why it happens: the command in question isn't in your PATH.
How to fix: either add the directory the command is in to PATH (export PATH=$PATH:/somedir) and add to your .bashrc; or run the command using an explicit path, i.e. ./hello.pl or /somedir/hello.pl
What it means: the program or script doesn't have execute permissions
Why it happens: if you do a simple download of a script or binary program file, the download usually loses the "execute" mode setting
How to fix: chmod +x file
What it means: the "shebang" line of a script points at an interpreter that isn't there.
Why it happens: either the interpreter isn't installed, or it's in a different location.
How to fix: search for the interpreter using apt-cache and install using apt-get, as per above. If the bug continues to occur, the script is probably pointing at the wrong location. Run which perl (or whatever) to find the correct location. For example, /usr/bin/perl. Then edit the script using nano file (or you favorite editor). The first line will say something like #!/usr/local/bin/perl -w". Replace the /usr/local/bin/perl with /usr/bin/perl. Be sure to leave the "#!" in place -- that's a special bit of syntax that needs to be at the beginning of every script.
What it means: shared libraries are collections of machine code stored outside binaries. The program depends on a library that isn't where the system is expecting to find it.
Why it happens: systems have a standard search path where they look for libraries. Either the library isn't in the search path (e.g. you installed to your home directory) or the library isn't on the system at all (you installed a binary program that depends on an uninstalled library).
How to fix: find the library in some directory. Set LD_LIBRARY_PATH to include that directory: export LD_LIBRARY_PATH=/somedirectory/path:/another When that is working, add it to your .bashrc. Alternatively, if you have admin privs, you can add the dir to a file in /etc/ld.so.conf.d and run ldconfig. If the library isn't present at all, and you installed from a binary, use apt-cache to search for the library, then apt-cache to install it.
What it means: A file (probably a header file) could not be found.
Why it happens: Either the header isn't installed, or the compiler doesn't know where to look.
How to fix: Install the package that contains the header (usually some library followed by -dev, i.e. libboost-dev). If the header is there but in the wrong place, adjust options as needed, edit the Makefile, and/or set CFLAGS.
What it means: the cpp file referenced a function -- probably a system function -- that hasn't been declared in an included header file.
Why it happens: sometimes a header that was previously included in one location stops being included in that location. Then you need to add it manually.
How to fix: determine which header file includes the function using a
manpage or grep. In this case, string.h. Then manually add
#include