参见英文答案 > “Failed to spawn mysql main process: unable to execute: No such file or directory” 14个
我无法升级MySQL服务器.这是我试过的:
我首先发出此命令来更新包列表:
sudo apt-get update
然后,升级:
sudo apt-get upgrade
它显示以下错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
mysql-server-5.5 : Depends: mysql-server-core-5.5 (= 5.5.28-0ubuntu0.12.04.2) but 5.5.31-0ubuntu0.12.04.1 is installed
E: Unmet dependencies. Try using -f.
显然安装了较新版本(但为什么?我没有手动安装).好的,正如它建议的那样,我发出命令来尝试修复:
sudo apt-get -f install
这是输出:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
mysql-server mysql-server-5.5
Suggested packages:
tinyca mailx
The following packages will be upgraded:
mysql-server mysql-server-5.5
2 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
2 not fully installed or removed.
Need to get 0 B/8889 kB of archives.
After this operation, 64.5 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_HK.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
dpkg: dependency problems prevent configuration of mysql-server-5.5:
mysql-server-5.5 depends on mysql-server-core-5.5 (= 5.5.28-0ubuntu0.12.04.2); however:
Version of mysql-server-core-5.5 on system is 5.5.31-0ubuntu0.12.04.1.
dpkg: error processing mysql-server-5.5 (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.5; however:
Package mysql-server-5.5 is not configured yet.
dpkg: error processing mysql-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
mysql-server-5.5
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
然后我尝试使用某些人在互联网上建议的另一个命令:
sudo apt-get -f upgrade
产生相同的输出.除了重新安装MySQL服务器,我还能做什么?
使用Ubuntu服务器12.04 LTS
解决方法:
这发生在我身上,但是在做了sudo apt-get更新后,它以某种方式没有得到mysql-server的最新版本,只有mysql-server-core.我首先建议做另一个sudo apt-get更新,然后继续安装包
sudo apt-get install mysql-server
如果这不起作用,那么重新安装:
sudo apt-get install --reinstall mysql-server
如果这不起作用,那么只需清除包mysql-server-core包,然后再次安装mysql-server.
sudo apt-get purge mysql-server-core mysql-server-core-5.5
sudo apt-get install mysql-server
如果这不起作用,那就疯狂吧:
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get purge mysql-server*
sudo apt-get install mysql-server
作为最后的手段,我会清除,重启,安装.
标签:mysql,apt 来源: https://codeday.me/bug/20190808/1617524.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。