Sunday, September 1, 2019

linux - Yum Fails When Installing PHP



I tried to install PHP with yum and I got a message like:



bash-3.2# yum install php


Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile
* epel: mirrors.tummy.com
* updates: mirror.anl.gov
* base: www.cyberuse.com
* addons: mirror.raystedman.net
* extras: www.cyberuse.com
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check

---> Package php.x86_64 0:5.1.6-23.2.el5_3 set to be updated
--> Processing Dependency: php-cli = 5.1.6-23.2.el5_3 for package: php
--> Processing Dependency: httpd-mmn = 20051115 for package: php
--> Processing Dependency: php-common = 5.1.6-23.2.el5_3 for package: php
--> Processing Dependency: file >= 4.0 for package: php
--> Processing Dependency: libaspell.so.15()(64bit) for package: php
--> Processing Dependency: libgmp.so.3()(64bit) for package: php
--> Processing Dependency: libcurl.so.3()(64bit) for package: php
--> Processing Dependency: libpspell.so.15()(64bit) for package: php
--> Processing Dependency: libidn.so.11()(64bit) for package: php

--> Running transaction check
---> Package php-cli.x86_64 0:5.1.6-23.2.el5_3 set to be updated
---> Package httpd.x86_64 0:2.2.3-22.el5.centos.1 set to be updated
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 229, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 145, in main
(result, resultmsgs) = base.buildTransaction()

File "/usr/lib/python2.4/site-packages/yum/init.py", line 647, in buildTransaction
(rescode, restring) = self.resolveDeps()
File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 696, in resolveDeps
CheckDeps, checkinstalls, checkremoves, missing = self._resolveRequires(errors)
File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 779, in _resolveRequires
thisneeds = self._checkInstall(txmbr)
File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 851, in _checkInstall
provs = self.tsInfo.getProvides(*req)
File "/usr/lib/python2.4/site-packages/yum/transactioninfo.py", line 432, in getProvides
result.update(self.getNewProvides(name, flag, version))

File "/usr/lib/python2.4/site-packages/yum/transactioninfo.py", line 414, in getNewProvides
for pkg, hits in self.pkgSack.getProvides(name, flag, version).iteritems():
File "/usr/lib/python2.4/site-packages/yum/packageSack.py", line 300, in getProvides
return self._computeAggregateDictResult("getProvides", name, flags, version)
File "/usr/lib/python2.4/site-packages/yum/packageSack.py", line 470, in _computeAggregateDictResult
sackResult = apply(method, args)
File "/usr/lib/python2.4/site-packages/yum/sqlitesack.py", line 861, in getProvides
return self._search("provides", name, flags, version)
File "/usr/lib/python2.4/site-packages/yum/sqlitesack.py", line 43, in newFunc
return func(*args, **kwargs)

File "/usr/lib/python2.4/site-packages/yum/sqlitesack.py", line 837, in _search
for pkg in self.searchFiles(name, strict=True):
File "/usr/lib/python2.4/site-packages/yum/sqlitesack.py", line 43, in newFunc
return func(*args, **kwargs)
File "/usr/lib/python2.4/site-packages/yum/sqlitesack.py", line 586, in searchFiles
self._sql_pkgKey2po(rep, cur, pkgs)
File "/usr/lib/python2.4/site-packages/yum/sqlitesack.py", line 470, in _sql_pkgKey2po
pkg = self._packageByKey(repo, ob['pkgKey'])
File "/usr/lib/python2.4/site-packages/yum/sqlitesack.py", line 413, in _packageByKey
po = self.pc(repo, cur.fetchone())

File "/usr/lib/python2.4/site-packages/yum/sqlitesack.py", line 68, in init
self._read_db_obj(db_obj)
File "/usr/lib/python2.4/site-packages/yum/sqlitesack.py", line 94, in _read_db_obj
setattr(self, item, _share_data(db_obj[item]))
TypeError: unsubscriptable object


Answer



Post output on Pastebin



Try "yum clean all" like the first poster says.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...