最近,我试图安装MySQL服务器,但是我遇到了以下错误:
E:子进程/usr/bin/dpkg返回一个错误代码(1)
这就是我试图安装MySQL服务器时所做的工作:
sudo apt-get install mysql-server但是在输入这个命令之后,我得到了一个错误:
dev@webos-develop:/var/lib/dpkg/info$ sudo apt-get install mysql-
server
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-server is already the newest version.
The following packages were automatically installed and are no longer required:
gnome-video-effects gyp libc-ares-dev libc-ares2 libjs-inherits libjs-jquery
libjs-node-uuid libjs-underscore libv8-3.14-dev libv8-3.14.5 node-abbrev
node-ansi node-ansi-color-table node-archy node-async node-block-stream
node-combined-stream node-cookie-jar node-delayed-stream node-forever-agent
node-form-data node-fstream node-fstream-ignore node-github-url-from-git
node-glob node-graceful-fs node-gyp node-inherits node-ini
node-json-stringify-safe node-lockfile node-lru-cache node-mime
node-minimatch node-mkdirp node-mute-stream node-node-uuid node-nopt
node-normalize-package-data node-npmlog node-once node-osenv node-qs
node-read node-read-package-json node-request node-retry node-rimraf
node-semver node-sha node-sigmund node-slide node-tar node-tunnel-agent
node-underscore node-which
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up mysql-server-5.6 (5.6.25-0ubuntu1) ...
/var/lib/dpkg/info/mysql-server-5.6.postinst: line 95: /usr/share/mysql-common/configure-symlinks: No such file or directory
dpkg: error processing package mysql-server-5.6 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.6; however:
Package mysql-server-5.6 is not configured yet.
dpkg: error processing package 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.6
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)在我用了
apt-cache policy mysql-server mysql-common我得到的输出是
mysql-server:
Installed: 5.6.25-0ubuntu1
Candidate: 5.6.25-0ubuntu1
Version table:
*** 5.6.25-0ubuntu1 0
500 http://in.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages
100 /var/lib/dpkg/status
mysql-common:
Installed: 10.1.16+maria-1~wily
Candidate: 10.1.16+maria-1~wily
Version table:
*** 10.1.16+maria-1~wily 0
500 http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu/ wily/main amd64 Packages
100 /var/lib/dpkg/status
5.6.25-0ubuntu1 0
500 http://in.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages发布于 2017-03-09 12:27:24
/usr/share/mysql-common/configure-symlinks: No such file or directory
参见:根据错误报告,https://bugs.launchpad.net/ubuntu/+source/mysql-5.6/+bug/1455818在5.6.27版本中修复了这个问题。
更新: OP说他使用Ubuntu15.10,尽管他的问题中有14.04个标签。
虽然15.10是EOL,但您应该可以访问5.6.31版本的MySQL https://launchpad.net/ubuntu/wily/+package/mysql-server
您发布的sources.list文件行显示了异种(16.04)。我相信你升级了系统。我希望现在一切顺利:)
https://askubuntu.com/questions/891217
复制相似问题