如何在 ubuntu 18.04 上安装 mono

如何在 ubuntu 18.04 上安装 mono

这是我正在尝试使用的代码

sudo apt install gnupg ca-certificates
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update

然而,当我输入第一行代码时,出现以下错误

E: Malformed line 4 in source list /etc/apt/sources.list.d/mono-official-stable.list (type)
E: The list of sources could not be read.
E: Malformed line 4 in source list /etc/apt/sources.list.d/mono-official-stable.list (type)
E: The list of sources could not be read.

答案1

也许您的列表文件中有拼写错误,或者密钥无效或已被更改,您可以使用以下方法检查:

cd /etc/apt/sources.list.d
gedit mono-official-stable.list # read only

如果您有正确的密钥或发现拼写错误,请尝试:

sudo gedit mono-official-stable.list

编辑、删除或注释第 4 行

相关内容