Search code examples
c#linuxamazon-web-servicesmonoamazon-linux

Error installing mono on Amazon Linux


Running a standard Amazon RHEL AMI and trying to install Mono by following the instructions here:

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

I got the following error:

...
--> 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

I DO NOT want to compile mono from source since that will take up too much disk space. Is there not another way?


Solution

  • I finally got this to work by installing libpng15 rpm package:

    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