尝试在 Ubuntu 18.04 上安装 Mysql 8 时出现 Dkpg 错误

尝试在 Ubuntu 18.04 上安装 Mysql 8 时出现 Dkpg 错误

我正在尝试在 AWS Ubuntu 18.04 实例上安装 mysql 8。

按照说明,我做了:

wget –c https://dev.mysql.com/get/mysql-apt-config_0.8.13-1_all.deb

答复是:

--2019-08-19 16:47:28--  http://xn--c-5gn/
Resolving xn--c-5gn (xn--c-5gn)... failed: Temporary failure in name resolution.
wget: unable to resolve host address ‘xn--c-5gn’
--2019-08-19 16:47:28--  https://dev.mysql.com/get/mysql-apt-config_0.8.13-1_all.deb
Resolving dev.mysql.com (dev.mysql.com)... 137.254.60.11
Connecting to dev.mysql.com (dev.mysql.com)|137.254.60.11|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://repo.mysql.com//mysql-apt-config_0.8.13-1_all.deb [following]
--2019-08-19 16:47:28--  https://repo.mysql.com//mysql-apt-config_0.8.13-1_all.deb
Resolving repo.mysql.com (repo.mysql.com)... 104.91.33.12
Connecting to repo.mysql.com (repo.mysql.com)|104.91.33.12|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 35560 (35K) [application/x-debian-package]
Saving to: ‘mysql-apt-config_0.8.13-1_all.deb’

mysql-apt-config_0.8.13-1_all.deb                100%[=========================================================================================================>]  34.73K  --.-KB/s    in 0.007s  

2019-08-19 16:47:28 (4.97 MB/s) - ‘mysql-apt-config_0.8.13-1_all.deb’ saved [35560/35560]

FINISHED --2019-08-19 16:47:28--
Total wall clock time: 0.4s
Downloaded: 1 files, 35K in 0.007s (4.97 MB/s)

然后我做了:

sudo dpkg –i mysql-apt-config_0.8.13-1_all.deb

答复是:

dpkg: error: need an action option

Type dpkg --help for help about installing and deinstalling packages [*];
Use 'apt' or 'aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;

Options marked [*] produce a lot of output - pipe it through 'less' or 'more' !

有任何想法吗?

答案1

请小心从某处复制命令。

您有印刷错误“ ”(破折号, 0xe2 0x80 0x93),但你应该有简单的减号“ -”(连字符减号,0x2d)。

您需要将命令修复为:

wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.13-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.13-1_all.deb

如果您正在遵循来自受尊敬来源的一些官方指南 - 那么请告诉其作者使用正确的符号。


如果您不确定命令语法 - 请参阅手册页:

  1. man wget本地或在线的
  2. man dpkg本地或在线的

相关内容