dir=$HOME"/so" echo $dir if [ ! -d $dir ] then mkdir $dir chmod -R 777 $dir echo -e "\033[32m make this $dir is success ! \033[0m" else echo -e "\033[032m directory already exists \033[0m" fi cp -r ./so $dir sudo sed -i "a $HOME/so" /etc/ld.so.conf sudo ldconfig
原文:https://www.cnblogs.com/lxfdf/p/14842678.html