我在 UBUNTU Server 16.04(xenial)上运行 LAMP。
我尝试运行apt-get update
并得到以下结果:
# 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.7 : Depends: mysql-server-core-5.7 (=5.7.12-0ubuntu1.1) but 5.7.15-0ubuntu0.16.04.1 is installed
E: Unmet dependencies. Try using -f.*
按照建议运行也apt-get -f install
没有帮助......
# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
mysql-server-5.7
Suggested packages:
tinyca
The following packages will be upgraded:
mysql-server-5.7
1 to upgrade, 0 to newly install, 0 to remove and 95 not to upgrade.
58 not fully installed or removed.
Need to get 0 B/2,572 kB of archives.
After this operation, 71.7 kB disk space will be freed.
Do you want to continue? [Y/n] Y
Preconfiguring packages ...
(Reading database ... 60616 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.7_5.7.15-0ubuntu0.16.04.1_amd64.deb ...
cp: cannot overwrite directory '/var/lib/mysql-upgrade/DATADIR.link/mysql' with non-directory
dpkg: error processing archive /var/cache/apt/archives/mysql-server-5.7_5.7.15-0ubuntu0.16.04.1_amd64.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/mysql-server-5.7_5.7.15-0ubuntu0.16.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)*
仅供参考:当我第一次安装时,我的 MySQL 数据库文件已被移动到 mysql 用户主文件夹,使用以下提示:http://article.my-addr.com/?show=linux_ubuntu_change_datadir-move_mysql_database_to_other_path 其余部分几乎按照标准安装进行。
预先感谢您的帮助,
吉奥