前天想部署一個 Python 項目在伺服器上,然後看見寶塔面板有個 Python 項目管理器。
於是安裝了插件,但是寶塔自帶的 Python 環境顯示不出來,於是我想重新安裝其他版本。
我使用這個插件安裝但是安裝不上,一直報錯,然後我在網上找了一些教程修復,但是還是不行。
今天我還是想繼續搞一下,然後我想先重啟一些伺服器,結果一重啟,寶塔面板打不開了。
但是我發現網站的 Nginx 和寶塔面板都是正常運行,然後 MySQL 和 PHP 都無法啟動。
我在寶塔論壇找一些帖子,嘗試自己修復了一番。
但是都不行,我發帖尋求官方幫助,但是奈何回復速度太慢了。
於是我自己操刀,先運行 **/etc/init.d/mysqld start** 啟動資料庫。
報錯信息如下:
/www/server/mysql/bin/my_print_defaults: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
Starting MySQL./www/server/mysql/bin/my_print_defaults: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
/www/server/mysql/bin/my_print_defaults: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
Logging to '/www/server/mysql/data/V20220927264084.err'.
ERROR! The server quit without updating PID file (/www/server/mysql/data/V20220927264084.pid).
找出萬能的 Google 一下,找到解決帖子:https://blog.csdn.net/tree_ifconfig/article/details/79437969
我使用的方法二,下載一個在 32 位軟體在 64 位 CentOS 上運行的 32 位的運行庫。
錯誤原因是:64 位 Linux 系統上安裝了 32 位的軟體會出現這種問題。
解決指令:
yum list|grep ia32-libs
yum -y install libaio.so.1 libgcc_s.so.1 libstdc++.so.6、
yum whatprovides libstdc++.so.6
yum install libstdc++-4.4.7-18.e16.i686
修復過後,MySQL 和 PHP 都正常運行了,網站能打開了。
寶塔面板始終無法打開,我修復然後重啟面板服務都沒有用。
我突然想起我開始根據論壇修改面板端口恢復面板訪問時,出現一段報錯。
但是我通過 bt 指令查看端口信息的時候,又顯示修改成功。
做完上面的修復指令,我重新修改了面板端口。
再次訪問寶塔面板,訪問成功。
但是我總對這次意外事件心裡不舒服,但是再次出現這樣的情況。
現在我要去備份數據,再次重啟伺服器,排除出會不會存在其他問題了。