If python2.7 is installed, the first execution reports an error: Error while loading shared libraries: libpython2.7.so. 1.0: cannot open shared object file: no such file or directory.
Solution: 1. edit VI/etc/lD. so. if the conf file is not logged on with a root account, use sudo VI/etc/lD. so. add the Lib library address of python2.7 in Conf, for example, my/usr/local/python2.7/lib, and save the file
2. Run the/sbin/ldconfig-V command. If you are logged on with a non-root account, use sudo/sbin/ldconfig-v. This way
LDD can be used to find this database. If you run python2.7, no error will be reported.
/Etc/lD. So. conf:
This file records the path of the dynamic link library used during compilation.
By default, the compiler only uses the library files in the/lib and/usr/lib directories.
If you have installed some libraries without specifying -- prefix =/usr, the Lib library will be installed under/usr/local, but not in/etc/lD. so. if/usr/local/lib is added to the conf file, an error is returned.
What is ldconfig:
It is a program, usually located under/sbin, which is used by the root user. The specific functions and usage can be found in man ldconfig.
To put it simply, it caches the library files in the paths listed in/etc/lD. So. conf to/etc/lD. So. cache for use.
Therefore, after installing some library files (such as just installed Glib), or modifying lD. So. conf to add a new library path, run/sbin/ldconfig
Make all the library files cached in LD. So. cache. If it is not done, it will not be used even if the library file is clearly under/usr/lib.
During compilation, the xxx library is missing.