Forums:
estube tratando de actualizar mi centos 4 con yum update pero mesalio unos errores, por estar moniando las configuraciones borre los archivos usr/bin/yum y usr/share/yum-cli/yummain.py ahora no me permite relizar ninguna tarea con yum
puede alguien darme la confuguracion de estos archivos
gracias
Aquí vaSaludosJuan
Este es el /usr/bin/yum
[quote]
#!/usr/bin/python
import sys
try:
import yum
except ImportError:
print >> sys.stderr, """\
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
%s
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
%s
If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq
""" % (sys.exc_value, sys.version)
sys.exit(1)
sys.path.insert(0, '/usr/share/yum-cli')
try:
import yummain
yummain.main(sys.argv[1:])
except KeyboardInterrupt, e:
print >> sys.stderr, "\n\nExiting on user cancel."
sys.exit(1)
[/quote]
Aquí va /usr/share/yum-cli/yummain.py
[quote]
import sys
import locale
import time # test purposes only
from yum import Errors
from yum import plugins
import cli
from i18n import _
YUM_PID_FILE = '/var/run/yum.pid'
def main(args):
"""This does all the real work"""
def exUserCancel():
base.errorlog(0, '\n\nExiting on user cancel')
unlock()
sys.exit(1)
def exIOError(e):
if e.errno == 32:
base.errorlog(0, '\n\nExiting on Broken Pipe')
unlock()
sys.exit(1)
def exPluginExit(e):
'''Called when a plugin raises PluginYumExit.
Log the plugin's exit message if one was supplied.
'''
exitmsg = str(e)
if exitmsg:
base.errorlog(2, '\n\n%s' % exitmsg)
unlock()
sys.exit(1)
def exFatal(e):
base.errorlog(0, '\n\n%s' % str(e))
unlock()
sys.exit(1)
def unlock():
try:
base.closeRpmDB()
base.doUnlock(YUM_PID_FILE)
except Errors.LockError, e:
sys.exit(200)
try:
locale.setlocale(locale.LC_ALL, '')
except locale.Error, e:
# default to C locale if we get a failure.
print >> sys.stderr, 'Failed to set locale, defaulting to C'
locale.setlocale(locale.LC_ALL, 'C')
# our core object for the cli
base = cli.YumBaseCli()
# do our cli parsing and config file setup
# also sanity check the things being passed on the cli
try:
base.getOptionsConfig(args)
except plugins.PluginYumExit, e:
exPluginExit(e)
except Errors.YumBaseError, e:
exFatal(e)
try:
base.doLock(YUM_PID_FILE)
except Errors.LockError, e:
base.errorlog(0,'%s' % e.msg)
sys.exit(200)
# build up an idea of what we're supposed to do
if base.basecmd == 'shell':
do = base.doShell
else:
do = base.doCommands
try:
result, resultmsgs = do()
except plugins.PluginYumExit, e:
exPluginExit(e)
except Errors.YumBaseError, e:
result = 1
resultmsgs = [str(e)]
except KeyboardInterrupt:
exUserCancel()
except IOError, e:
exIOError(e)
# Act on the command/shell result
if result == 0:
# Normal exit
for msg in resultmsgs:
base.log(2, '%s' % msg)
unlock()
sys.exit(0)
elif result == 1:
# Fatal error
for msg in resultmsgs:
base.errorlog(0, 'Error: %s' % msg)
unlock()
sys.exit(1)
elif result == 2:
# Continue on
pass
elif result == 100:
unlock()
sys.exit(100)
else:
base.errorlog(0, 'Unknown Error(s): Exit Code: %d:' % result)
for msg in resultmsgs:
base.errorlog(0, msg)
unlock()
sys.exit(3)
# Depsolve stage
base.log(2, 'Resolving Dependencies')
base.log(3, time.time())
try:
(result, resultmsgs) = base.buildTransaction()
except plugins.PluginYumExit, e:
exPluginExit(e)
except Errors.YumBaseError, e:
result = 1
resultmsgs = [str(e)]
except KeyboardInterrupt:
exUserCancel()
except IOError, e:
exIOError(e)
# Act on the depsolve result
if result == 0:
# Normal exit
unlock()
sys.exit(0)
elif result == 1:
# Fatal error
for msg in resultmsgs:
base.errorlog(0, 'Error: %s' % msg)
unlock()
sys.exit(1)
elif result == 2:
# Continue on
pass
else:
base.errorlog(0, 'Unknown Error(s): Exit Code: %d:' % result)
for msg in resultmsgs:
base.errorlog(0, msg)
unlock()
sys.exit(3)
base.log(2, '\nDependencies Resolved')
base.log(3, time.time())
# Run the transaction
try:
base.doTransaction()
except plugins.PluginYumExit, e:
exPluginExit(e)
except Errors.YumBaseError, e:
exFatal(e)
except KeyboardInterrupt:
exUserCancel()
except IOError, e:
exIOError(e)
base.log(2, 'Complete!')
unlock()
sys.exit(0)
if __name__ == "__main__":
#import hotshot
#p = hotshot.Profile(os.path.expanduser("~/yum.prof"))
#p.run('main(sys.argv[1:])')
#p.close()
try:
main(sys.argv[1:])
except KeyboardInterrupt, e:
print >> sys.stderr, "\n\nExiting on user cancel."
sys.exit(1)
[/quote]
Saludos
Juan Yépez
Juan Yépez
093681879
Saludos
Juan Yépez
0993681879
Dj - Discomovil Quito
Gracias... copie con vi
Gracias...
copie con vi /usr/bi/yum y vi /usr/share/yum-cli/yummain.py
pero me sale:
[root@mail /]# yum update
bash: /usr/bin/yum: Permiso denegado
creo que tambie le puse un rpm -e yum...
hay algo mas que deba hacer??
gracias
nstale el yum con rpm -Uvh
nstale el yum con rpm -Uvh yum x.x.x
al parecer lo instalo pero ahora me sale :
[root@mail /]# yum -y update
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
No module named yum
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.3.4 (#1, Feb 22 2005, 04:09:37)
[GCC 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq
[root@mail /]#
Instale el yum con rpm -Uvh
Instale el yum con rpm -Uvh yum x.x.x
al parecer lo instalo pero ahora me sale :
[root@mail /]# yum -y update
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
No module named yum
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.3.4 (#1, Feb 22 2005, 04:09:37)
[GCC 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq
[root@mail /]#
Me imagino que instalaste la
Me imagino que instalaste la versión que te vino en el medio magnético que descargaste.
Descarga una versión más actualizada.
Tambén podrías probar con up2date.
Saludos
Juan Yépez
093681879
Saludos
Juan Yépez
0993681879
Dj - Discomovil Quito
Hice todo lo que me dijiste
Hice todo lo que me dijiste pero ahora me salo esto:
[root@mail /]# yum update
Setting up Update Process
Setting up repositories
Reading repository metadata in from local files
(process:14758): GLib-CRITICAL **: file gtimer.c: line 106 (g_timer_stop): assertion `timer != NULL' failed
(process:14758): GLib-CRITICAL **: file gtimer.c: line 88 (g_timer_destroy): assertion `timer != NULL' failed
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
yummain.main(sys.argv[1:])
File "/usr/share/yum-cli/yummain.py", line 97, in main
result, resultmsgs = do()
File "/usr/share/yum-cli/cli.py", line 477, in doCommands
return self.updatePkgs()
File "/usr/share/yum-cli/cli.py", line 955, in updatePkgs
self.doRepoSetup()
File "/usr/share/yum-cli/cli.py", line 75, in doRepoSetup
self.doSackSetup(thisrepo=thisrepo)
File "__init__.py", line 260, in doSackSetup
File "repos.py", line 277, in populateSack
File "/usr/lib/python2.3/site-packages/sqlitecachec.py", line 40, in getPrimary
self.repoid))
TypeError: Can not create index on requires table: near "NOT": syntax error
[root@mail /]#
como puedo solucionarlo???