麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 系統(tǒng) > Ubuntu > 正文

阿里云ECS(ubuntu16.04)安裝mysql遇到的一些問題

2024-06-28 16:04:44
字體:
供稿:網(wǎng)友

離建立自己的站點(diǎn)就差安裝MySQL環(huán)境了,之前安裝過,一直覺得安裝mysql是個(gè)非常簡單的事情,還是遇到一些問題,特此刻錄下來以便需要的童鞋參考。

1、更新鏡像源;

apt-get update

2、安裝mysql-server

apt-get install mysql-server

這時(shí)提示出錯(cuò)信息,安裝不成功,錯(cuò)誤信息如下

Reading package lists... DoneBuilding dependency tree Reading state information... DoneThe following additional packages will be installed: libcgi-fast-perl libcgi-pm-perl libencode-locale-perl libevent-core-2.0-5 libfcgi-perl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl liburi-perl mysql-server-5.7Suggested packages: libdata-dump-perl libipc-sharedcache-perl libwww-perl tinycaThe following NEW packages will be installed: libcgi-fast-perl libcgi-pm-perl libencode-locale-perl libevent-core-2.0-5 libfcgi-perl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl liburi-perl mysql-server mysql-server-5.70 upgraded, 15 newly installed, 0 to remove and 78 not upgraded.E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)E: Unable to lock directory /var/cache/apt/archives/

經(jīng)查明,此原因的問題是因?yàn)閍pt-get進(jìn)程被占用

ps -aux

找到包含apt-get的進(jìn)程信息

root 8436 0.0 0.0 0 0 ? S 08:12 0:00 [kworker/1:0]root 8826 0.0 0.0 0 0 ? S 08:18 0:00 [kworker/0:2]root 9121 0.0 0.0 0 0 ? S 08:18 0:00 [kworker/1:1]root 9835 0.0 0.0 0 0 ? S 08:31 0:00 [kworker/0:0]root 10250 0.0 0.0 0 0 ? S 09:13 0:00 [kworker/u4:2]root 10275 0.0 1.9 118924 79872 pts/0 S+ 09:16 0:00 apt-get install mysql-serverroot 10280 0.0 0.0 4508 784 pts/0 S+ 09:16 0:00 /bin/sh -c /usr/sbin/dpkg-PRecoroot 10281 0.0 0.4 62600 17404 pts/0 S+ 09:16 0:00 /usr/bin/perl -w /usr/sbin/dpkgroot 10287 0.0 0.0 0 0 pts/0 Z+ 09:16 0:00 [dpkg-preconfigu] <defunct>root 10292 0.0 0.0 12596 2960 pts/0 S+ 09:16 0:00 /bin/bash /tmp/mysql-server-5.7root 10296 0.0 0.0 20496 3176 pts/0 S+ 09:16 0:00 whiptail --backtitle Package coroot 10300 0.0 0.0 0 0 ? S 09:18 0:00 [kworker/u4:0]root 10301 0.0 0.1 95400 7004 ? Ss 09:19 0:00 sshd: root@pts/1root 10318 0.0 0.1 22496 5232 pts/1 Ss 09:19 0:00 -bashroot 10845 0.0 0.0 37364 3384 pts/1 R+ 09:30 0:00 ps -aux

使用

kill 10275

殺死該進(jìn)程,繼續(xù)執(zhí)行

apt-get install mysql-server

又出現(xiàn)錯(cuò)誤

Reading package lists... DoneBuilding dependency tree Reading state information... DoneThe following additional packages will be installed: libcgi-fast-perl libcgi-pm-perl libencode-locale-perl libevent-core-2.0-5 libfcgi-perl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl liburi-perl mysql-server-5.7Suggested packages: libdata-dump-perl libipc-sharedcache-perl libwww-perl tinycaThe following NEW packages will be installed: libcgi-fast-perl libcgi-pm-perl libencode-locale-perl libevent-core-2.0-5 libfcgi-perl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl liburi-perl mysql-server mysql-server-5.70 upgraded, 15 newly installed, 0 to remove and 78 not upgraded.Need to get 0 B/3,144 kB of archives.After this Operation, 50.5 MB of additional disk space will be used.Do you want to continue? [Y/n] Ydebconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailableSelecting previously unselected package libevent-core-2.0-5:amd64.(Reading database ... 100455 files and directories currently installed.)Preparing to unpack .../libevent-core-2.0-5_2.0.21-stable-2_amd64.deb ...Unpacking libevent-core-2.0-5:amd64 (2.0.21-stable-2) ...Selecting previously unselected package mysql-server-5.7.Preparing to unpack .../mysql-server-5.7_5.7.17-0Ubuntu0.16.04.2_amd64.deb ...debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailabledpkg: error processing archive /var/cache/apt/archives/mysql-server-5.7_5.7.17-0ubuntu0.16.04.2_amd64.deb (--unpack): subprocess new pre-installation script returned error exit status 1debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailabledpkg: error while cleaning up: subprocess new post-removal script returned error exit status 1Selecting previously unselected package libhtml-tagset-perl.Preparing to unpack .../libhtml-tagset-perl_3.20-2_all.deb ...Unpacking libhtml-tagset-perl (3.20-2) ...Selecting previously unselected package liburi-perl.Preparing to unpack .../liburi-perl_1.71-1_all.deb ...Unpacking liburi-perl (1.71-1) ...Selecting previously unselected package libhtml-parser-perl.Preparing to unpack .../libhtml-parser-perl_3.72-1_amd64.deb ...Unpacking libhtml-parser-perl (3.72-1) ...Selecting previously unselected package libcgi-pm-perl.Preparing to unpack .../libcgi-pm-perl_4.26-1_all.deb ...Unpacking libcgi-pm-perl (4.26-1) ...Selecting previously unselected package libfcgi-perl.Preparing to unpack .../libfcgi-perl_0.77-1build1_amd64.deb ...Unpacking libfcgi-perl (0.77-1build1) ...Selecting previously unselected package libcgi-fast-perl.Preparing to unpack .../libcgi-fast-perl_1%3a2.10-1_all.deb ...Unpacking libcgi-fast-perl (1:2.10-1) ...Selecting previously unselected package libencode-locale-perl.Preparing to unpack .../libencode-locale-perl_1.05-1_all.deb ...Unpacking libencode-locale-perl (1.05-1) ...Selecting previously unselected package libhtml-template-perl.Preparing to unpack .../libhtml-template-perl_2.95-2_all.deb ...Unpacking libhtml-template-perl (2.95-2) ...Selecting previously unselected package libhttp-date-perl.Preparing to unpack .../libhttp-date-perl_6.02-1_all.deb ...Unpacking libhttp-date-perl (6.02-1) ...Selecting previously unselected package libio-html-perl.Preparing to unpack .../libio-html-perl_1.001-1_all.deb ...Unpacking libio-html-perl (1.001-1) ...Selecting previously unselected package liblwp-mediatypes-perl.Preparing to unpack .../liblwp-mediatypes-perl_6.02-1_all.deb ...Unpacking liblwp-mediatypes-perl (6.02-1) ...Selecting previously unselected package libhttp-message-perl.Preparing to unpack .../libhttp-message-perl_6.11-1_all.deb ...Unpacking libhttp-message-perl (6.11-1) ...Selecting previously unselected package mysql-server.Preparing to unpack .../mysql-server_5.7.17-0ubuntu0.16.04.2_all.deb ...Unpacking mysql-server (5.7.17-0ubuntu0.16.04.2) ...Processing triggers for man-db (2.7.5-1) ...Errors were encountered while processing: /var/cache/apt/archives/mysql-server-5.7_5.7.17-0ubuntu0.16.04.2_amd64.debE: Sub-process /usr/bin/dpkg returned an error code (1)

仔細(xì)查看日志輸出信息,發(fā)現(xiàn)

debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable

執(zhí)行

rm -rf /var/cache/debconf/*.dat

再次運(yùn)行

apt-get install mysql-server

又出現(xiàn)一堆錯(cuò)誤,蛋疼

Reading package lists... DoneBuilding dependency tree Reading state information... Donemysql-server is already the newest version (5.7.17-0ubuntu0.16.04.2).Suggested packages: tinycaThe following packages will be upgraded: mysql-server-5.71 upgraded, 0 newly installed, 0 to remove and 78 not upgraded.15 not fully installed or removed.Need to get 0 B/2,466 kB of archives.After this operation, 48.3 MB of additional disk space will be used.Preconfiguring packages ...(Reading database ... 100684 files and directories currently installed.)Preparing to unpack .../mysql-server-5.7_5.7.17-0ubuntu0.16.04.2_amd64.deb ...grep: /etc/mysql/: No such file or directoryUnpacking mysql-server-5.7 (5.7.17-0ubuntu0.16.04.2) over (5.7.17-0ubuntu0.16.04.2) ...Processing triggers for systemd (229-4ubuntu13) ...Processing triggers for ureadahead (0.100.0-19) ...Processing triggers for man-db (2.7.5-1) ...Setting up libevent-core-2.0-5:amd64 (2.0.21-stable-2) ...Setting up mysql-server-5.7 (5.7.17-0ubuntu0.16.04.2) ...update-alternatives: warning: alternative /etc/mysql/my.cnf.fallback (part of link group my.cnf) doesn't exist; removing from list of alternativesupdate-alternatives: warning: /etc/alternatives/my.cnf is dangling; it will be updated with best choiceupdate-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto modeRenaming removed key_buffer and myisam-recover options (if present)ERROR: Unable to start MySQL server:mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)mysqld: [ERROR] Fatal error in defaults handling. Program aborted!Please take a look at https://wiki.debian.org/Teams/MySQL/FAQ for tips on fixing common upgrade issues.Once the problem is resolved, run apt-get --fix-broken install to retry.dpkg: error processing package mysql-server-5.7 (--configure): subprocess installed post-installation script returned error exit status 1Setting up libhtml-tagset-perl (3.20-2) ...Setting up liburi-perl (1.71-1) ...Setting up libhtml-parser-perl (3.72-1) ...Setting up libcgi-pm-perl (4.26-1) ...Setting up libfcgi-perl (0.77-1build1) ...Setting up libcgi-fast-perl (1:2.10-1) ...Setting up libencode-locale-perl (1.05-1) ...Setting up libhtml-template-perl (2.95-2) ...Setting up libhttp-date-perl (6.02-1) ...Setting up libio-html-perl (1.001-1) ...Setting up liblwp-mediatypes-perl (6.02-1) ...Setting up libhttp-message-perl (6.11-1) ...dpkg: dependency problems prevent configuration of mysql-server: mysql-server depends on mysql-server-5.7; however: Package mysql-server-5.7 is not configured yet.dpkg: error processing package mysql-server (--configure): dependency problems - leaving unconfiguredProcessing triggers for libc-bin (2.23-0ubuntu5) ...Processing triggers for systemd (229-4ubuntu13) ...Processing triggers for ureadahead (0.100.0-19) ...Errors were encountered while processing: mysql-server-5.7 mysql-serverE: Sub-process /usr/bin/dpkg returned an error code (1)
發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 最新精品在线 | 久久在草 | 欧美日本一区二区 | 欧洲精品久久久久69精品 | 欧美日韩亚洲在线观看 | 日本成人一区二区三区 | 日韩精品中文字幕在线播放 | 97zyz成人免费视频 | jizzjizz中国少妇中文 | 偿还电影免费 | av免费在线观 | 久久人人av | 亚洲经典视频 | 日本视频在线播放 | 国内精品久久久久久影视8 嫩草影院在线观看网站成人 | 亚洲精品成人av在线 | 毛片在线播放视频 | 91超视频 | 久草在线手机视频 | 92自拍视频 | 99精品国产在热久久婷婷 | 私库av在线免费观看 | 日本在线一区二区 | 91久久夜色精品国产网站 | 国产一极毛片 | h视频免费在线观看 | 91嫩草丨国产丨精品入口 | 草久影院| 涩涩屋av | 久久国产精品99久久人人澡 | 成人在线观看免费高清 | 亚洲视频在线观看免费 | 午夜视频色 | 97se亚洲综合在线韩国专区福利 | 韩国精品一区二区三区四区五区 | 欧美成人精品一区 | h视频免费在线 | 2017亚洲男人天堂 | av免费在线观看不卡 | 天天干天天碰 | 亚洲综合91|