Add a custom library search path method and set the /etc/profile environment variable (according to the directory used when compiling and installing the library)
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/share/linuxlib/lib
export LIBRARY_PATH=$LIBRARY_PATH:/home/share/linuxlib/lib
export PATH=$PATH:/home/share/linuxlib/bin
# C
export C_INCLUDE_PATH=$C_INCLUDE_PATH:/home/share/linuxlib/include
# CPP
export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/home/share/linuxlib/include