从mysql官网上下载mysql-server_5.7.21-1ubuntu14.04_amd64.deb-bundle.tar,然后进行离线安装,解压该安装包,会出现11个依赖包,按照顺序依次使用sudodpkg-i进行安装,中间会报错,显示缺少相应的依赖,具体如下:*******@ubuntu:/opt/mysql$sudodpkg-imysql-community-client_5.7.21-1ubuntu14.04_amd64.debSelectingpreviouslyunselectedpackagemysql-community-client.(Readingdatabase...208518filesanddirectoriescurrentlyinstalled.)Preparingtounpackmysql-community-client_5.7.21-1ubuntu14.04_amd64.deb...Unpackingmysql-community-client(5.7.21-1ubuntu14.04)...dpkg:dependencyproblemspreventconfigurationofmysql-community-client:mysql-community-clientdependsonlibaio1(>=0.3.93);however:Packagelibaio1isnotinstalled.dpkg:errorprocessingpackagemysql-community-client(--install):dependencyproblems-leavingunconfiguredProcessingtriggersforman-db(2.6.7.1-1ubuntu1)...Errorswereencounteredwhileprocessing:mysql-community-client和********@ubuntu:/opt/mysql$sudodpkg-imysql-community-server_5.7.21-1ubuntu14.04_amd64.debSelectingpreviouslyunselectedpackagemysql-community-server.(Readingdatabase...208598filesanddirectoriescurrentlyinstalled.)Preparingtounpackmysql-community-server_5.7.21-1ubuntu14.04_amd64.deb...Unpackingmysql-community-server(5.7.21-1ubuntu14.04)...dpkg:dependencyproblemspreventconfigurationofmysql-community-server:mysql-community-serverdependsonlibmecab2(>=0.996-1.1);however:Packagelibmecab2isnotinstalled.dpkg:errorprocessingpackagemysql-community-server(--install):dependencyproblems-leavingunconfiguredProcessingtriggersforman-db(2.6.7.1-1ubuntu1)...Processingtriggersforureadahead(0.100.0-16)...ureadaheadwillbereprofiledonnextrebootErrorswereencounteredwhileprocessing:mysql-community-server附上依赖包安装顺序:1.mysql-common_5.7.21-1ubuntu14.04_amd64.deb2.libmysqlclient20_5.7.21-1ubuntu14.04_amd64.deb3.libmysqlclient-dev_5.7.21-1ubuntu14.04_amd64.deb4.libmysqld-dev_5.7.21-1ubuntu14.04_amd64.deb
1