Find the answer to your Linux question:
Results 1 to 5 of 5
Hi all, I've tried to work with yum. but if I "yum install .." enter, then i get this error : PHP Code: error :  no dbpath has been set error :  cannot open Packages database in  /%{ ...
  1. #1
    Just Joined!
    Join Date
    Jul 2009
    Posts
    5

    Question I have a problem with Yum - Centos

    Hi all,

    I've tried to work with yum. but if I "yum install .." enter, then i get this error :

    PHP Code:
    errorno dbpath has been set
    error
    cannot open Packages database in /%{_dbpath}
    Traceback (most recent call last):
      
    File "/usr/bin/yum"line 30in ?
        
    yummain.main(sys.argv[1:])
      
    File "/usr/share/yum/yummain.py"line 163in main
        
    (logerrorlogfilelogconfcmds) = parseCmdArgs(args)
      
    File "/usr/share/yum/yummain.py"line 75in parseCmdArgs
        conf
    =yumconf(configfile=yumconffile)
      
    File "/usr/share/yum/config.py"line 155in __init__
        self
    .yumvar['releasever'] = self._getsysver()
      
    File "/usr/share/yum/config.py"line 285in _getsysver
        idx 
    ts.dbMatch('provides'self.distroverpkg)
    TypeErrorrpmdb open failed 
    What do i have to do ?
    I've tried this too, but it hasn't fixed

    PHP Code:
    rm -rf /var/lib/rpm/__db*
    rpm --rebuilddb 

  2. #2
    Just Joined!
    Join Date
    Jul 2009
    Posts
    5
    Hi all,

    Have you no idea ?

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Interesting. Which version of CentOS are you running, and how did you install it? Also, did yum ever work for you? From your error messages it seems that something has nuked your yum configuration information. What do you see in /etc/yum and /etc/yum.repos.d? FYI, they are directories.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. #4
    Just Joined!
    Join Date
    Jul 2009
    Posts
    5
    Quote Originally Posted by Rubberman View Post
    Interesting. Which version of CentOS are you running, and how did you install it? Also, did yum ever work for you? From your error messages it seems that something has nuked your yum configuration information. What do you see in /etc/yum and /etc/yum.repos.d? FYI, they are directories.
    1. The version is CentOS Linux 5.3 .
    2. Yes, Yum have already worked for me.
    3. i see in /etc/yum
    pluginconf.d
    yum-updatesd.conf
    4. i see in /etc/yum.repos.d
    CentOS-Base.repo
    CentOS-Media.repo
    lxlabs.repo
    openvz.repo

  5. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Yum is a python script. Did you do anything that might have messed up your python installation recently? Here is the sum total of the yum executable:
    Code:
    #!/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.user_main(sys.argv[1:], exit_code=True)
    except KeyboardInterrupt, e:
        print >> sys.stderr, "\n\nExiting on user cancel."
        sys.exit(1)
    In any case, the traceback from python indicates where the error is coming from - /usr/share/yum/config.py
    Sorry, but I don't have the time to debug this for you further than this. The only conclusion I can come to is that something has munged your yum/python configuration.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...