mysql-server没有在ubuntu上安装

时间:2014-12-18 10:19:23

标签: php mysql ubuntu

我在mysql登录时遇到问题所以我试图重新安装mysql-server但是我无法重新安装

* Ubuntu版本13.04

我尝试了以下命令

   sudo apt-get update
   sudo apt-get install  mysql-server
   sudo service mysql restart

但它会出现以下错误

root@bts23:~# sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libaio1 libdbd-mysql-perl libdbi-perl libmysqlclient18 libnet-daemon-perl libplrpc-perl libterm-readkey-perl mysql-client-5.5 mysql-client-core-5.5
  mysql-common mysql-server-5.5 mysql-server-core-5.5
Suggested packages:
  tinyca mailx
The following NEW packages will be installed:
  libaio1 libdbd-mysql-perl libdbi-perl libmysqlclient18 libnet-daemon-perl libplrpc-perl libterm-readkey-perl mysql-client-5.5 mysql-client-core-5.5
  mysql-common mysql-server mysql-server-5.5 mysql-server-core-5.5
0 upgraded, 13 newly installed, 0 to remove and 1 not upgraded.
Need to get 26.1 MB/26.2 MB of archives.
After this operation, 91.3 MB of additional disk space will be used.
Do you want to continue [Y/n]? y


WARNING: The following packages cannot be authenticated!
  libaio1 mysql-common libmysqlclient18 libnet-daemon-perl libplrpc-perl libdbi-perl libdbd-mysql-perl mysql-client-core-5.5 libterm-readkey-perl
  mysql-client-5.5 mysql-server-core-5.5 mysql-server-5.5 mysql-server
Install these packages without verification [y/N]? y
Err http://in.archive.ubuntu.com/ubuntu/ raring/main libaio1 i386 0.3.109-3
  404  Not Found [IP: 91.189.91.13 80]
Err http://in.archive.ubuntu.com/ubuntu/ raring/main mysql-common all 5.5.29-0ubuntu1
  404  Not Found [IP: 91.189.91.13 80]
Err http://in.archive.ubuntu.com/ubuntu/ raring/main libmysqlclient18 i386 5.5.29-0ubuntu1
  404  Not Found [IP: 91.189.91.13 80]
Err http://in.archive.ubuntu.com/ubuntu/ raring/main libdbi-perl i386 1.622-1
  404  Not Found [IP: 91.189.91.13 80]
Err http://in.archive.ubuntu.com/ubuntu/ raring/main libdbd-mysql-perl i386 4.021-1
  404  Not Found [IP: 91.189.91.13 80]
Err http://in.archive.ubuntu.com/ubuntu/ raring/main mysql-client-core-5.5 i386 5.5.29-0ubuntu1
  404  Not Found [IP: 91.189.91.13 80]
Err http://in.archive.ubuntu.com/ubuntu/ raring/main mysql-client-5.5 i386 5.5.29-0ubuntu1
  404  Not Found [IP: 91.189.91.13 80]
Err http://in.archive.ubuntu.com/ubuntu/ raring/main mysql-server-core-5.5 i386 5.5.29-0ubuntu1
  404  Not Found [IP: 91.189.91.13 80]
Err http://in.archive.ubuntu.com/ubuntu/ raring/main mysql-server-5.5 i386 5.5.29-0ubuntu1
  404  Not Found [IP: 91.189.91.13 80]
Err http://in.archive.ubuntu.com/ubuntu/ raring/main mysql-server all 5.5.29-0ubuntu1
  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/liba/libaio/libaio1_0.3.109-3_i386.deb  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-common_5.5.29-0ubuntu1_all.deb  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/libmysqlclient18_5.5.29-0ubuntu1_i386.deb  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/libd/libdbi-perl/libdbi-perl_1.622-1_i386.deb  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/libd/libdbd-mysql-perl/libdbd-mysql-perl_4.021-1_i386.deb  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-client-core-5.5_5.5.29-0ubuntu1_i386.deb  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-client-5.5_5.5.29-0ubuntu1_i386.deb  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-server-core-5.5_5.5.29-0ubuntu1_i386.deb  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-server-5.5_5.5.29-0ubuntu1_i386.deb  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-server_5.5.29-0ubuntu1_all.deb  404  Not Found [IP: 91.189.91.13 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

当我在此之后尝试重启/状态时,它会抛出以下错误

root@bts23:~# service mysql restart
mysql: unrecognized service
root@bts23:~# mysql
The program 'mysql' is currently not installed. You can install it by typing:
apt-get install mysql-client-core-5.5
root@bts23:~# 

2 个答案:

答案 0 :(得分:1)

如果你看一下http://in.archive.ubuntu.com/ubuntu/dists/,你可以看到没有raring文件夹。这就是您收到404错误的原因。

对Ubuntu 13.04的支持于2014年1月27日正式结束。如果您仍想使用此版本,请尝试使用http://old-releases.ubuntu.com/更新源文件(/etc/apt/sources.list)

答案 1 :(得分:1)

软件和更新设置中将服务器下载更改为主服务 r。然后按照以下命令删除mysql服务器(如果呈现),然后重新安装。.

sudo apt-get remove --purge mysql-server mysql-client mysql-common mysql-server-5.5 mysql-client-5.5 mysql-server-core-5.5 mysql-client-core-5.5
sudo apt-get autoremove
sudo apt-get autoclean
sudo rm -rf /var/lib/mysql /etc/mysql
sudo deluser mysql
sudo apt-get update
sudo apt-get dist-upgrade
sudo reboot
sudo apt-get install mysql-server-5.6