Description of problem: nginx lacks dependencies so a simple yum install nginx won't suffice. Version-Release number of selected component (if applicable): # yum info nginx Installed Packages Name : nginx Arch : x86_64 Version : 1.0.14 Release : 1.el6 Size : 1.0 M Repo : installed From repo : epel How reproducible: Every time. Steps to Reproduce: 1. Install a minimal EL 6 (I used Centos) 2. Install EPEL 3. yum install nginx 4. service nginx start Actual results: # service nginx start Starting nginx: /usr/sbin/nginx: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory [FAILED] Expected results: # service nginx start Starting nginx: [ OK ] Additional info: # ldd `which nginx` linux-vdso.so.1 => (0x00007fffa49ff000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f709291b000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f70926e3000) libpcre.so.0 => /lib64/libpcre.so.0 (0x00007f70924b7000) libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007f709225c000) libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f7091ec1000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f7091cbd000) libz.so.1 => /lib64/libz.so.1 (0x00007f7091aa7000) libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00007f7091755000) libxslt.so.1 => /usr/lib64/libxslt.so.1 (0x00007f7091519000) libexslt.so.0 => /usr/lib64/libexslt.so.0 (0x00007f7091305000) libgd.so.2 => /usr/lib64/libgd.so.2 (0x00007f70910bd000) libGeoIP.so.1 => /usr/lib64/libGeoIP.so.1 (0x00007f7090e85000) libperl.so => /usr/lib64/perl5/CORE/libperl.so (0x00007f7090b1a000) libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f70908ff000) libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f70906e6000) libm.so.6 => /lib64/libm.so.6 (0x00007f7090462000) libutil.so.1 => /lib64/libutil.so.1 (0x00007f709025e000) libc.so.6 => /lib64/libc.so.6 (0x00007f708fece000) /lib64/ld-linux-x86-64.so.2 (0x00007f7092b3e000) libfreebl3.so => /lib64/libfreebl3.so (0x00007f708fc6c000) libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f708fa29000) libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f708f74a000) libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f708f546000) libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f708f319000) libgcrypt.so.11 => /lib64/libgcrypt.so.11 (0x00007f708f0a4000) libgpg-error.so.0 => /lib64/libgpg-error.so.0 (0x00007f708ee9f000) libXpm.so.4 => /usr/lib64/libXpm.so.4 (0x00007f708ec8e000) libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f708e94f000) libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x00007f708e72a000) libfontconfig.so.1 => not found libfreetype.so.6 => not found libpng12.so.0 => not found libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f708e51e000) libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f708e31a000) libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007f708e0ff000) libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f708dedf000) libXau.so.6 => not found Installing the libs manually works around the issue: yum install /usr/lib64/lib{fontconfig.so.1,freetype.so.6,png12.so.0,Xau.so.6} I don't recall having the same issue before, but that was 0.8.54.1.el6 so a lot might have changed by now.
nginx does not depend on libfontconfig, libfreetype, libpng12 and libXau via direct dependencies, it depends on libgd.so, which in turn depends on those 4 libraries. I attempted to force a similar issue on a centos 6 machine I have, and was only able to do so after forcing a library to be uninstalled outside of yum. doing a hignly unadvised 'rpm -e --nodeps libpng' was the only way I could force a transitively depended upon library to be removed and then install nginx. Can you run a 'yum check dependencies' and see if you have errors? I would think you would get something similar to: $ sudo yum check dependencies Loaded plugins: fastestmirror, priorities gd-2.0.35-10.el6.x86_64 has missing requires of libpng12.so.0()(64bit) gd-2.0.35-10.el6.x86_64 has missing requires of libpng12.so.0(PNG12_0)(64bit) Error: check ['dependencies'] Doing a 'yum reinstall gd' should fix it. Are you doing a custom minimal install with a kickstart script (or similar) and forcing some rpms to install via 'rpm -ivh --nodeps' or similar? As far as I can tell that would be the only way to produce a situation like what you encountered. -jeremy
I indeed did a minimal install with a kickstart and can confirm that libgd.so.2 is actually the cause. However, yum reinstall gd doesn't appear to fix it. There doesn't appear to be a dependency on the libs. Since it's from the CentOS repo and I don't have access to a RHEL6 machine to verify it happens there too, but the gd.spec files from CentOS6 and RHEL6Server are exactly the same it might. The %packages section from the kickstart (please keep I didn't write list :P): centos-release-cr epel-release @base @core screen vim-enhanced mc mailx ntp vmware-tools-esx-nox autoconf strace -gpm -amtu -avahi-compat-libdns_sd -cups -redhat-lsb -avahi -cpuspeed -bluez* -cups -cups-libs -kudzu -nfs* -ypbind -yp-tools -portmap -pcsc-lite -pcsc-lite-libs -ccid -coolkey -ifd-egate -pcsc* -smartmontools -yum-updatesd -xfs -dmidecode -hdparm -wireless-tools -rhpl -cairo -stunnel -ecryptfs-utils -gtk2 -trousers -NetworkManager -NetworkManager-glib -hal -pm-utils -autofs -kudzu -firstboot-tui -system-config-network-tui -logwatch -prelink -bind-libs -bind-utils -b43-openfwwf -kernel-firmware -*firmware -dhclient -system-config-firewall-base
Since I'm not that familiar with yum & rpm I asked a colleague to help me investigate the issue. It turns out vmware tools has a package (vmware-tools-libraries-x) which pretends to provide the libs, doesn't really. This caused yum to be happy but I'm not. We filed a support request at vmware, but in the short term w'll modify our kickstarts to exclude the package.