Skip to content

Instantly share code, notes, and snippets.

@carlwgeorge
Created April 30, 2015 15:41
Show Gist options
  • Save carlwgeorge/32741418412d99993438 to your computer and use it in GitHub Desktop.
Save carlwgeorge/32741418412d99993438 to your computer and use it in GitHub Desktop.

Let's install phpMyAdmin.

[root@test6 ~]# yum -v install phpMyAdmin

Yum resolves the 'php(language)' dependency with the highest available package, php56u-common, and adds it to the transaction.

--> Processing Dependency: php(language) >= 5.2.17 for package: phpMyAdmin-4.0.10.5-1.el6.noarch
TSINFO: Marking php56u-common-5.6.2-3.ius.centos6.x86_64 as install for phpMyAdmin-4.0.10.5-1.el6.noarch

Yum gets confused trying to resolve the 'php-json' dependency.

--> Processing Dependency: php-json for package: phpMyAdmin-4.0.10.5-1.el6.noarch
Searching pkgSack for dep: php-json

Yum evaluates what is needed if php54-common is used.

looking for ('rtld(GNU_HASH)', None, (None, None, None)) as a requirement of php54-common.x86_64 0:5.4.34-1.ius.centos6 - None
looking for ('libpthread.so.0(GLIBC_2.2.5)(64bit)', None, (None, None, None)) as a requirement of php54-common.x86_64 0:5.4.34-1.ius.centos6 - None
looking for ('libc.so.6(GLIBC_2.8)(64bit)', None, (None, None, None)) as a requirement of php54-common.x86_64 0:5.4.34-1.ius.centos6 - None
looking for ('libz.so.1()(64bit)', None, (None, None, None)) as a requirement of php54-common.x86_64 0:5.4.34-1.ius.centos6 - None
looking for ('libpthread.so.0()(64bit)', None, (None, None, None)) as a requirement of php54-common.x86_64 0:5.4.34-1.ius.centos6 - None
looking for ('libcurl.so.4()(64bit)', None, (None, None, None)) as a requirement of php54-common.x86_64 0:5.4.34-1.ius.centos6 - None

Yum evaluates what is needed if php-common is used.

looking for ('rtld(GNU_HASH)', None, (None, None, None)) as a requirement of php-common.x86_64 0:5.3.3-40.el6_6 - None
looking for ('libc.so.6(GLIBC_2.8)(64bit)', None, (None, None, None)) as a requirement of php-common.x86_64 0:5.3.3-40.el6_6 - None
looking for ('libz.so.1()(64bit)', None, (None, None, None)) as a requirement of php-common.x86_64 0:5.3.3-40.el6_6 - None
looking for ('libcurl.so.4()(64bit)', None, (None, None, None)) as a requirement of php-common.x86_64 0:5.3.3-40.el6_6 - None

Yum evaluates what is needed if php56u-pecl-jsonc is used.

looking for ('php(zend-abi)', 'EQ', ('0', '20131226', '64')) as a requirement of php56u-pecl-jsonc.x86_64 0:1.3.6-3.ius.centos6 - None
looking for ('php(api)', 'EQ', ('0', '20131106', '64')) as a requirement of php56u-pecl-jsonc.x86_64 0:1.3.6-3.ius.centos6 - None
looking for ('rtld(GNU_HASH)', None, (None, None, None)) as a requirement of php56u-pecl-jsonc.x86_64 0:1.3.6-3.ius.centos6 - None
looking for ('php56u-pear', None, (None, None, None)) as a requirement of php56u-pecl-jsonc.x86_64 0:1.3.6-3.ius.centos6 - None
looking for ('php56u-pear', None, (None, None, None)) as a requirement of php56u-pecl-jsonc.x86_64 0:1.3.6-3.ius.centos6 - None
looking for ('libc.so.6(GLIBC_2.8)(64bit)', None, (None, None, None)) as a requirement of php56u-pecl-jsonc.x86_64 0:1.3.6-3.ius.centos6 - None
looking for ('/bin/sh', None, (None, None, None)) as a requirement of php56u-pecl-jsonc.x86_64 0:1.3.6-3.ius.centos6 - None
looking for ('/bin/sh', None, (None, None, None)) as a requirement of php56u-pecl-jsonc.x86_64 0:1.3.6-3.ius.centos6 - None

Yum evaluates what is needed if php55u-pecl-jsonc is used.

looking for ('php(zend-abi)', 'EQ', ('0', '20121212', '64')) as a requirement of php55u-pecl-jsonc.x86_64 0:1.3.6-3.ius.centos6 - None
looking for ('php(api)', 'EQ', ('0', '20121113', '64')) as a requirement of php55u-pecl-jsonc.x86_64 0:1.3.6-3.ius.centos6 - None
looking for ('rtld(GNU_HASH)', None, (None, None, None)) as a requirement of php55u-pecl-jsonc.x86_64 0:1.3.6-3.ius.centos6 - None
looking for ('php55u-pear', None, (None, None, None)) as a requirement of php55u-pecl-jsonc.x86_64 0:1.3.6-3.ius.centos6 - None
looking for ('php55u-pear', None, (None, None, None)) as a requirement of php55u-pecl-jsonc.x86_64 0:1.3.6-3.ius.centos6 - None
looking for ('libc.so.6(GLIBC_2.8)(64bit)', None, (None, None, None)) as a requirement of php55u-pecl-jsonc.x86_64 0:1.3.6-3.ius.centos6 - None
looking for ('/bin/sh', None, (None, None, None)) as a requirement of php55u-pecl-jsonc.x86_64 0:1.3.6-3.ius.centos6 - None
looking for ('/bin/sh', None, (None, None, None)) as a requirement of php55u-pecl-jsonc.x86_64 0:1.3.6-3.ius.centos6 - None

After evaluating the options, yum decides that php-common is the best choice.

TSINFO: Marking php-common-5.3.3-40.el6_6.x86_64 as install for phpMyAdmin-4.0.10.5-1.el6.noarch

But yum is wrong! It added a package (php-common) to the transaction that has a conflict with a package already in the transaction (php56u-common).

--> Processing Conflict: php56u-common-5.6.2-3.ius.centos6.x86_64 conflicts php-common < 5.6
php56u-common conflicts with php-common-5.3.3-40.el6_6.x86_64
Error: php56u-common conflicts with php-common-5.3.3-40.el6_6.x86_64
@immanetize
Copy link

But wait, there's more! phpMyAdmin requires php-common, and while yum resolves this to the closest match for the require, there are other packages that provide it.

~]# repoquery -q --plugins --whatprovides php-common | grep php56u
php56u-common-0:5.6.6-1.ius.el6.x86_64
< more versions >

let's try excluding php-common:

~]# yum install phpMyAdmin --exclude php-common --exclude php-*
Loaded plugins: replace, rhnplugin, security
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package phpMyAdmin.noarch 0:4.0.10.16-1.el6 will be installed
--> Processing Dependency: php-tcpdf-dejavu-sans-fonts for package: phpMyAdmin-4.0.10.16-1.el6.noarch
--> Processing Dependency: php-tcpdf for package: phpMyAdmin-4.0.10.16-1.el6.noarch
--> Processing Dependency: php-php-gettext for package: phpMyAdmin-4.0.10.16-1.el6.noarch
--> Finished Dependency Resolution
Error: Package: phpMyAdmin-4.0.10.16-1.el6.noarch (rs-epel)
Requires: php-tcpdf-dejavu-sans-fonts
Error: Package: phpMyAdmin-4.0.10.16-1.el6.noarch (rs-epel)
Requires: php-tcpdf
Error: Package: phpMyAdmin-4.0.10.16-1.el6.noarch (rs-epel)
Requires: php-php-gettext
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

Still some unmet deps... just in case yum stopped resolving the transaction before they were all resolved:

~]# repoquery -q --plugins --requires phpMyAdmin | grep php | while read require; do PROVIDER=$(repoquery -q --plugins --whatprovides "$require" --qf="%{name}" --disablerepo=* --enablerepo=rackspace-rhel-x86_64-server-6-ius| sort -u); [ -z "$PROVIDER" ] && echo "nothing provides $require" ; done
nothing provides php-php-gettext
nothing provides php-tcpdf
nothing provides php-tcpdf-dejavu-sans-fonts

I suspect this would be resolvable with a php56u-php-gettext and php56u-tcpdf + subpackages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment