Linux mysql安装 1 2
日期:2016 /04 /28 15:23:02
当遇到下面错误:
sudo apt-get installMySQL-server mysql-client正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
有一些软件包无法被安装。如果您用的是 unstable 发行版,这也许是
因为系统无法达到您要求的状态造成的。该版本中可能会有一些您需要的软件
包尚未被创建或是它们已被从新到(Incoming)目录移出。
下列信息可能会对解决问题有所帮助:
下列软件包有未满足的依赖关系:
mysql-client : 依赖: mysql-client-5.5 但是它将不会被安装
mysql-server : 依赖: mysql-server-5.5 但是它将不会被安装
E: 无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系。
解决:
先安装:
sudo apt-get install mysql-client-core-5.5
Linux mysql安装 2
Hadoop@master:~$ sudo apt-get installMySQL-server
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
将会安装下列额外的软件包:
libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
libterm-readkey-perl mysql-client-5.5 mysql-common mysql-server-5.5
mysql-server-core-5.5
建议安装的软件包:
libmldbm-perl libnet-daemon-perl libplrpc-perl libsql-statement-perl
libipc-sharedcache-perl tinyca mailx
下列【新】软件包将被安装:
libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
libterm-readkey-perl mysql-client-5.5 mysql-common mysql-server
mysql-server-5.5 mysql-server-core-5.5
升级了 0 个软件包,新安装了 10 个软件包,要卸载 0 个软件包,有 158 个软件包未被升级。
需要下载 8,343 kB 的软件包。
解压缩后会消耗掉 86.8 MB 的额外空间。
您希望继续执行吗? [Y/n]
输入Y进入到安装界面,在安装过程中,会弹出一个界面要求输入mysql的root的密码,这里一定输入,省得安装后再设密码了。
再次输入密码:
获取:1 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-common all 5.5.38-0ubuntu0.14.04.1 [14.1 kB]
获取:2 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libmysqlclient18 i386 5.5.38-0ubuntu0.14.04.1 [592 kB]
获取:3 http://us.archive.ubuntu.com/ubuntu/ trusty/main libdbi-perl i386 1.630-1 [881 kB]
获取:4 http://us.archive.ubuntu.com/ubuntu/ trusty/main libdbd-mysql-perl i386 4.025-1 [99.6 kB]
获取:5 http://us.archive.ubuntu.com/ubuntu/ trusty/main libterm-readkey-perl i386 2.31-1 [27.2 kB]
获取:6 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-client-5.5 i386 5.5.38-0ubuntu0.14.04.1 [1,433 kB]
获取:7 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-server-core-5.5 i386 5.5.38-0ubuntu0.14.04.1 [3,135 kB]
获取:8 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-server-5.5 i386 5.5.38-0ubuntu0.14.04.1 [2,082 kB]
获取:9 http://us.archive.ubuntu.com/ubuntu/ trusty/main libhtml-template-perl all 2.95-1 [65.5 kB]
获取:10 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-server all 5.5.38-0ubuntu0.14.04.1 [12.4 kB]
下载 8,343 kB,耗时 49秒 (168 kB/s)
正在预设定软件包 ...
Selecting previously unselected package mysql-common.
(正在读取数据库... 系统当前共安装有 212184 个文件和目录。)
Preparing to unpack .../mysql-common_5.5.38-0ubuntu0.14.04.1_all.deb ...
Unpacking mysql-common (5.5.38-0ubuntu0.14.04.1) ...
Selecting previously unselected package libmysqlclient18:i386.
Preparing to unpack .../libmysqlclient18_5.5.38-0ubuntu0.14.04.1_i386.deb ...
Unpacking libmysqlclient18:i386 (5.5.38-0ubuntu0.14.04.1) ...
Selecting previously unselected package libdbi-perl.
Preparing to unpack .../libdbi-perl_1.630-1_i386.deb ...
Unpacking libdbi-perl (1.630-1) ...
Selecting previously unselected package libdbd-mysql-perl.
Preparing to unpack .../libdbd-mysql-perl_4.025-1_i386.deb ...
Unpacking libdbd-mysql-perl (4.025-1) ...
Selecting previously unselected package libterm-readkey-perl.
Preparing to unpack .../libterm-readkey-perl_2.31-1_i386.deb ...
Unpacking libterm-readkey-perl (2.31-1) ...
Selecting previously unselected package mysql-client-5.5.
Preparing to unpack .../mysql-client-5.5_5.5.38-0ubuntu0.14.04.1_i386.deb ...
Unpacking mysql-client-5.5 (5.5.38-0ubuntu0.14.04.1) ...
Selecting previously unselected package mysql-server-core-5.5.
Preparing to unpack .../mysql-server-core-5.5_5.5.38-0ubuntu0.14.04.1_i386.deb ...
Unpacking mysql-server-core-5.5 (5.5.38-0ubuntu0.14.04.1) ...
Processing triggers for man-db (2.6.7.1-1) ...
正在设置 mysql-common (5.5.38-0ubuntu0.14.04.1) ...
Selecting previously unselected package mysql-server-5.5.
(正在读取数据库 ... 系统当前共安装有 212532 个文件和目录。)
Preparing to unpack .../mysql-server-5.5_5.5.38-0ubuntu0.14.04.1_i386.deb ...
Unpacking mysql-server-5.5 (5.5.38-0ubuntu0.14.04.1) ...
Selecting previously unselected package libhtml-template-perl.
Preparing to unpack .../libhtml-template-perl_2.95-1_all.deb ...
Unpacking libhtml-template-perl (2.95-1) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.5.38-0ubuntu0.14.04.1_all.deb ...
Unpacking mysql-server (5.5.38-0ubuntu0.14.04.1) ...
Processing triggers for ureadahead (0.100.0-16) ...
ureadahead will be reprofiled on next reboot
Processing triggers for man-db (2.6.7.1-1) ...
正在设置 libmysqlclient18:i386 (5.5.38-0ubuntu0.14.04.1) ...
正在设置 libdbi-perl (1.630-1) ...
正在设置 libdbd-mysql-perl (4.025-1) ...
正在设置 libterm-readkey-perl (2.31-1) ...
正在设置 mysql-client-5.5 (5.5.38-0ubuntu0.14.04.1) ...
正在设置 mysql-server-core-5.5 (5.5.38-0ubuntu0.14.04.1) ...
正在设置 mysql-server-5.5 (5.5.38-0ubuntu0.14.04.1) ...
16:29:54 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
mysql start/running, process 31215
正在设置 libhtml-template-perl (2.95-1) ...
Processing triggers for ureadahead (0.100.0-16) ...
正在设置 mysql-server (5.5.38-0ubuntu0.14.04.1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.1) .