开发者社区> 问答> 正文

ubuntu 12.04 lts 安装 mariadb 报错,请指教?报错

请问,下面的报错信息应该怎么解决呢?

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libdbd-mysql-perl libmariadbclient18 libmysqlclient18 mariadb-client-5.5 mariadb-client-core-5.5 mariadb-common mariadb-server-5.5 mariadb-server-core-5.5 mysql-common
Suggested packages:
  tinyca mailx mariadb-test
The following NEW packages will be installed:
  libdbd-mysql-perl libmariadbclient18 libmysqlclient18 mariadb-client-5.5 mariadb-client-core-5.5 mariadb-common mariadb-server mariadb-server-5.5 mariadb-server-core-5.5
  mysql-common
0 upgraded, 10 newly installed, 0 to remove and 2 not upgraded.
Need to get 0 B/31.0 MB of archives.
After this operation, 104 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
Selecting previously unselected package mysql-common.
(Reading database ... 36265 files and directories currently installed.)
Unpacking mysql-common (from .../mysql-common_5.5.31+maria-1~precise_all.deb) ...
Selecting previously unselected package mariadb-common.
Unpacking mariadb-common (from .../mariadb-common_5.5.31+maria-1~precise_all.deb) ...
Selecting previously unselected package libmariadbclient18.
Unpacking libmariadbclient18 (from .../libmariadbclient18_5.5.31+maria-1~precise_i386.deb) ...
Selecting previously unselected package libmysqlclient18.
Unpacking libmysqlclient18 (from .../libmysqlclient18_5.5.31+maria-1~precise_i386.deb) ...
Selecting previously unselected package libdbd-mysql-perl.
Unpacking libdbd-mysql-perl (from .../libdbd-mysql-perl_4.020-1build2_i386.deb) ...
Selecting previously unselected package mariadb-client-core-5.5.
Unpacking mariadb-client-core-5.5 (from .../mariadb-client-core-5.5_5.5.31+maria-1~precise_i386.deb) ...
Selecting previously unselected package mariadb-client-5.5.
Unpacking mariadb-client-5.5 (from .../mariadb-client-5.5_5.5.31+maria-1~precise_i386.deb) ...
Selecting previously unselected package mariadb-server-core-5.5.
Unpacking mariadb-server-core-5.5 (from .../mariadb-server-core-5.5_5.5.31+maria-1~precise_i386.deb) ...
Processing triggers for man-db ...
Setting up mysql-common (5.5.31+maria-1~precise) ...
Setting up mariadb-common (5.5.31+maria-1~precise) ...
Selecting previously unselected package mariadb-server-5.5.
(Reading database ... 36444 files and directories currently installed.)
Unpacking mariadb-server-5.5 (from .../mariadb-server-5.5_5.5.31+maria-1~precise_i386.deb) ...
Selecting previously unselected package mariadb-server.
Unpacking mariadb-server (from .../mariadb-server_5.5.31+maria-1~precise_all.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up libmysqlclient18 (5.5.31+maria-1~precise) ...
Setting up libdbd-mysql-perl (4.020-1build2) ...
Setting up libmariadbclient18 (5.5.31+maria-1~precise) ...
Setting up mariadb-client-core-5.5 (5.5.31+maria-1~precise) ...
Setting up mariadb-client-5.5 (5.5.31+maria-1~precise) ...
Setting up mariadb-server-core-5.5 (5.5.31+maria-1~precise) ...
Setting up mariadb-server-5.5 (5.5.31+maria-1~precise) ...
 * Stopping MariaDB database server mysqld                                                                                                                                     [ OK ] 
130711 23:47:38 [Note] Plugin 'InnoDB' is disabled.
130711 23:47:38 [Note] Plugin 'FEEDBACK' is disabled.
 * Starting MariaDB database server mysqld                                                                                                                                     [fail] 
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mariadb-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mariadb-server:
 mariadb-server depends on mariadb-server-5.5 (= 5.5.31+maria-1~precise); however:
  Package mariadb-server-5.5 is not configured yet.
dpkg: error processing mariadb-server (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin ...
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          ldconfig deferred processing now taking place
Errors were encountered while processing:
 mariadb-server-5.5
 mariadb-server

我已经试过删除,然后清理 mysql 重新安装了,也试过 10 这个版本,一样的错误。请指教


按照 @eechen 同学的方法安装记录

# sudo apt-get install mariadb-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libdbd-mysql-perl libmariadbclient18 libmysqlclient18 mariadb-client-5.5
  mariadb-client-core-5.5 mariadb-common mariadb-server-5.5 mariadb-server-core-5.5
  mysql-common
Suggested packages:
  tinyca mailx mariadb-test
The following NEW packages will be installed:
  libdbd-mysql-perl libmariadbclient18 libmysqlclient18 mariadb-client-5.5
  mariadb-client-core-5.5 mariadb-common mariadb-server mariadb-server-5.5
  mariadb-server-core-5.5 mysql-common
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 30.9 MB/31.0 MB of archives.
After this operation, 104 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://mirrors.ustc.edu.cn/mariadb/repo/5.5/ubuntu/ precise/main mysql-common all 5.5.31+maria-1~precise [8,790 B]
Get:2 http://mirrors.ustc.edu.cn/mariadb/repo/5.5/ubuntu/ precise/main mariadb-common all 5.5.31+maria-1~precise [3,272 B]
Get:3 http://mirrors.ustc.edu.cn/mariadb/repo/5.5/ubuntu/ precise/main libmariadbclient18 i386 5.5.31+maria-1~precise [840 kB]
Get:4 http://mirrors.ustc.edu.cn/mariadb/repo/5.5/ubuntu/ precise/main libmysqlclient18 i386 5.5.31+maria-1~precise [2,932 B]
Get:5 http://mirrors.ustc.edu.cn/mariadb/repo/5.5/ubuntu/ precise/main mariadb-client-core-5.5 i386 5.5.31+maria-1~precise [1,797 kB]
Get:6 http://mirrors.ustc.edu.cn/mariadb/repo/5.5/ubuntu/ precise/main mariadb-client-5.5 i386 5.5.31+maria-1~precise [5,100 kB]
Get:7 http://mirrors.ustc.edu.cn/mariadb/repo/5.5/ubuntu/ precise/main mariadb-server-core-5.5 i386 5.5.31+maria-1~precise [5,140 kB]
Get:8 http://mirrors.ustc.edu.cn/mariadb/repo/5.5/ubuntu/ precise/main mariadb-server-5.5 i386 5.5.31+maria-1~precise [18.0 MB]
Get:9 http://mirrors.ustc.edu.cn/mariadb/repo/5.5/ubuntu/ precise/main mariadb-server all 5.5.31+maria-1~precise [2,972 B]
Fetched 30.9 MB in 2min 1s (253 kB/s)                                                 
Preconfiguring packages ...
Selecting previously unselected package mysql-common.
(Reading database ... 89679 files and directories currently installed.)
Unpacking mysql-common (from .../mysql-common_5.5.31+maria-1~precise_all.deb) ...
Selecting previously unselected package mariadb-common.
Unpacking mariadb-common (from .../mariadb-common_5.5.31+maria-1~precise_all.deb) ...
Selecting previously unselected package libmariadbclient18.
Unpacking libmariadbclient18 (from .../libmariadbclient18_5.5.31+maria-1~precise_i386.deb) ...
Selecting previously unselected package libmysqlclient18.
Unpacking libmysqlclient18 (from .../libmysqlclient18_5.5.31+maria-1~precise_i386.deb) ...
Selecting previously unselected package libdbd-mysql-perl.
Unpacking libdbd-mysql-perl (from .../libdbd-mysql-perl_4.020-1build2_i386.deb) ...
Selecting previously unselected package mariadb-client-core-5.5.
Unpacking mariadb-client-core-5.5 (from .../mariadb-client-core-5.5_5.5.31+maria-1~precise_i386.deb) ...
Selecting previously unselected package mariadb-client-5.5.
Unpacking mariadb-client-5.5 (from .../mariadb-client-5.5_5.5.31+maria-1~precise_i386.deb) ...
Selecting previously unselected package mariadb-server-core-5.5.
Unpacking mariadb-server-core-5.5 (from .../mariadb-server-core-5.5_5.5.31+maria-1~precise_i386.deb) ...
Processing triggers for man-db ...
Setting up mysql-common (5.5.31+maria-1~precise) ...
Setting up mariadb-common (5.5.31+maria-1~precise) ...
Selecting previously unselected package mariadb-server-5.5.
(Reading database ... 89858 files and directories currently installed.)
Unpacking mariadb-server-5.5 (from .../mariadb-server-5.5_5.5.31+maria-1~precise_i386.deb) ...
Selecting previously unselected package mariadb-server.
Unpacking mariadb-server (from .../mariadb-server_5.5.31+maria-1~precise_all.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up libmysqlclient18 (5.5.31+maria-1~precise) ...
Setting up libdbd-mysql-perl (4.020-1build2) ...
Setting up libmariadbclient18 (5.5.31+maria-1~precise) ...
Setting up mariadb-client-core-5.5 (5.5.31+maria-1~precise) ...
Setting up mariadb-client-5.5 (5.5.31+maria-1~precise) ...
Setting up mariadb-server-core-5.5 (5.5.31+maria-1~precise) ...
Setting up mariadb-server-5.5 (5.5.31+maria-1~precise) ...
 * Stopping MariaDB database server mysqld                                      [ OK ] 
130712 11:31:20 [Note] Plugin 'InnoDB' is disabled.
130712 11:31:20 [Note] Plugin 'FEEDBACK' is disabled.
 * Starting MariaDB database server mysqld                                      [fail] 
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mariadb-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mariadb-server:
 mariadb-server depends on mariadb-server-5.5 (= 5.5.31+maria-1~precise); however:
  Package mariadb-server-5.5 is not configured yet.
dpkg: error processing mariadb-server (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin ...
No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
                                     ldconfig deferred processing now taking place
Errors were encountered while processing:
 mariadb-server-5.5
 mariadb-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

展开
收起
爱吃鱼的程序员 2020-06-22 18:26:37 892 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    Ubuntu12.04 precise 安装MariaDB5.5

    sudonano/etc/apt/sources.list #添加以下4句 
    #MariaDB5.5repositorylist 
    #http://mariadb.org/mariadb/repositories/ 
    debhttp://mirrors.ustc.edu.cn/mariadb/repo/5.5/ubuntu precise main 
    deb-srchttp://mirrors.ustc.edu.cn/mariadb/repo/5.5/ubuntu precise main 

    sudoapt-keyadv--recv-keys--keyserverkeyserver.ubuntu.com0xcbcb082a1bb943db  
    sudoapt-getupdate  
    sudoapt-getinstallmariadb-server 

    安装过程中会自动卸载原来apt安装的MySQL,原有数据会平滑过渡到MariaDB.

    参见:

    http://downloads.mariadb.org/mariadb/repositories/
    https://kb.askmonty.org/en/installing-mariadb-deb-files/

    我就是按照这个流程安装的时候报错的。

    @Dray卸载掉MySQL和MariaDB,仔细按上面的步骤重装:
    sudoapt-getremove  mysql-server  mariadb-server

    我之前是sudoapt-getpurgemysql*mariadb*,find/-namemysql*然后全部清理掉,再安装的

    再次清理下看看

    sudoapt-getpurgemysql*mariadb*&&sudoapt-getautoclean&&sudoapt-getautoremovefind/-namemysql*find/-namemariadb*

    重启后,应该是干净了的。但是总感觉是缺少什么有关联的配置引起的,奇怪

    配置mariadb源(具体根据你的操作系统配置)

    sudoapt-getremovemysql*

    sudoapt-getmariadb-servermariadb-client

    2020-06-22 18:26:53
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
CentOS Nginx PHP JAVA多语言镜像使用手册 立即下载
CentOS Nginx PHP JAVA 多语言镜像使用手 立即下载
低代码开发师(初级)实战教程 立即下载