在Amazon Linux上安装mono时出错

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在Amazon Linux上安装mono时出错相关的知识,希望对你有一定的参考价值。

运行标准的Amazon RHEL AMI并尝试按照此处的说明安装Mono:

http://www.mono-project.com/docs/getting-started/install/linux/#centos-fedora-and-derivatives

我收到以下错误:

...
--> Processing Dependency: libpng15.so.15(PNG15_0)(64bit) for package: libgdiplus0-3.12-0.x86_64
--> Processing Dependency: libpng15.so.15()(64bit) for package: libgdiplus0-3.12-0.x86_64
---> Package libpciaccess.x86_64 0:0.13.1-4.1.11.amzn1 will be installed
---> Package mesa-dri-filesystem.x86_64 0:10.1.2-2.32.amzn1 will be installed
---> Package mesa-dri1-drivers.x86_64 0:7.11-8.6.amzn1 will be installed
--> Finished Dependency Resolution
Error: Package: libgdiplus0-3.12-0.x86_64 (download.mono-project.com_repo_centos_)
Requires: libpng15.so.15(PNG15_0)(64bit)
Error: Package: libgdiplus0-3.12-0.x86_64 (download.mono-project.com_repo_centos_)
Requires: libpng15.so.15()(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

我不想从源代码编译单声道,因为这会占用太多的磁盘空间。没有别的办法吗?

答案

我终于通过安装libpng15 rpm包来实现这个目的:

wget http://dl.fedoraproject.org/pub/fedora/linux/releases/26/Everything/x86_64/os/Packages/l/libpng15-1.5.28-2.fc26.x86_64.rpm
sudo yum install -y libpng15-1.5.28-2.fc26.x86_64.rpm
rm libpng15-1.5.28-2.fc26.x86_64.rpm
sudo rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"
sudo yum-config-manager --add-repo http://download.mono-project.com/repo/centos/
sudo yum install -y mono

以上是关于在Amazon Linux上安装mono时出错的主要内容,如果未能解决你的问题,请参考以下文章

Linux 上的 NuGet:获取响应流时出错

在 Amazon Linux 2 上将 node.js 应用程序部署到 Elastic Beanstalk 时出错

在 Amazon Linux 中安装 Jenkins 时出错

从 Amazon AWS EC2 服务器上的 Node.js 连接到 Redis 服务器时出错

在 Amazon Linux 上安装 Tkinter

在Amazon Linux上安装Tkinter