我已经安装了apache2,安装了PHP7。已安装phpmyadmin。然后我尝试用我创建的用户创建一个数据库。不幸的是,我无法创建数据库,因为我没有正确的权限。所以我决定从头开始删除所有内容(apache2、mysql、php、phpmyadmin)。
为了删除mysql服务器,我使用了以下命令±
sudo apt-get remove --purge mysql*
sudo apt-get autoremove
sudo apt-get autoclean
现在我被mysql的安装困住了。我想我删除的比我应该删除的多。
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mysql-server-5.6 : PreDepends: mysql-common (>= 5.5) but it is not
installable
Depends: libdbi-perl but it is not installable
Depends: mysql-client-5.6 (>= 5.6.35-1+deb.sury.org~xenial+0
.1) but it is not going to be installed
Depends: mysql-common (>= 5.6.22-1~) but it is not installable
E: Unable to correct problems, you have held broken packages.
当我使用apt get update时:
root@localhost:~# apt-get update
Hit:1 http://archive.canonical.com/ubuntu xenial InRelease
Hit:2 http://ppa.launchpad.net/ondrej/mysql-5.6/ubuntu xenial InRelease
Hit:3 http://ppa.launchpad.net/ondrej/mysql-5.7/ubuntu xenial InRelease
Hit:4 http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease
当我使用:sudo apt get install-f
root@localhost:~# sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
善待干净:一无所获
sudo apt get-f安装:
root@localhost:~# sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
sudo apt get-o debug::pkgproblemrolver=yes dist升级
root@localhost:~# sudo apt-get -o Debug::pkgProblemResolver=yes dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
因为安装没有成功´我不能工作,我陷入了一些其他错误我也改变了源列表文件。
1条答案
按热度按时间zhte4eai1#
我找到了解决办法。在我的例子中,它与etc/apt目录中的sourcelist文件有关。
我更新了文件
跑步:
要应用任何更新,请运行以下命令之一:
看到答案了吗