Open Source Development

Power Open Source Development

Explore the open source tools and capabilities for building and deploying modern applications on IBM Power platforms including AIX, IBM i, and Linux.


#Power


#Power

 View Only
  • 1.  yum fails because /var/lib/rpm/Packages is missing

    Posted Wed August 26, 2020 05:48 AM
    A new installation of YUM on AIX6.1 - 6100-09-12-1846 (yes we still have a few of these unfortunately) with 

    rpm.rte 4.13.0.11 and yum-prereq bundle installed.

    rpm -qa output:
    expat-2.1.0-1.ppc readline-6.1-2.ppc gettext-0.19.7-1.ppc yum-metadata-parser-1.1.4-2.ppc db-4.8.24-3.ppc pysqlite-1.1.7-2.ppc ca-certificates-2016.10.7-2.ppc python-pycurl-7.19.3-1.ppc yum-3.4.3-7.noarch python-tools-2.7.10-1.ppc libffi-3.0.10-1.ppc rpm-3.0.5-46.ppc sqlite-3.15.2-1.ppc glib2-2.14.6-2.ppc gdbm-1.8.3-5.ppc python-2.7.10-1.ppc python-iniparse-0.4-1.noarch curl-7.52.1-1.ppc python-urlgrabber-3.10.1-1.noarch python-devel-2.7.10-1.ppc AIX-rpm-6.1.9.400-14.ppc

    # yum list installed
    Traceback (most recent call last): File "/usr/bin/yum", line 32, in <module> yummain.user_main(sys.argv[1:], exit_code=True) File "/opt/freeware/share/yum-cli/yummain.py", line 288, in user_main errcode = main(args) File "/opt/freeware/share/yum-cli/yummain.py", line 140, in main result, resultmsgs = base.doCommands() File "/opt/freeware/share/yum-cli/cli.py", line 440, in doCommands return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds) File "/opt/freeware/share/yum-cli/yumcommands.py", line 304, in doCommand ypl = base.returnPkgLists(extcmds, installed_available=highlight) File "/opt/freeware/share/yum-cli/cli.py", line 1006, in returnPkgLists ignore_case=True) File "/opt/freeware/lib/python2.7/site-packages/yum/__init__.py", line 2305, in doPackageLists ignore_case=ic): File "/opt/freeware/lib/python2.7/site-packages/yum/rpmsack.py", line 618, in returnPackages self._makePackageObject(hdr, idx) File "/opt/freeware/lib/python2.7/site-packages/yum/rpmsack.py", line 1273, in _makePackageObject self._cached_rpmdb_mtime = os.path.getmtime(rpmdbfname) File "/opt/freeware/lib/python2.7/genericpath.py", line 62, in getmtime return os.stat(filename).st_mtime OSError: [Errno 2] A file or directory in the path name does not exist.: '//var/lib/rpm/Packages'

    root@xxxx [/root]# ls -l /var/lib/rpm
    lrwxrwxrwx 1 root system 26 26 Aug 17:17 /var/lib/rpm -> ../../opt/freeware/lib/rpm

    root@xxxx [/root]# ls -l /opt/freeware/lib/rpm
    lrwxrwxrwx 1 root system 20 26 Aug 19:21 /opt/freeware/lib/rpm -> /usr/opt/rpm/lib/rpm

    root@xxxx [/root]# ls /usr/opt/rpm/lib/rpm
    brp-compress check-buildroot fileattrs macros.php perl.req rpmrc brp-java-gcjcompile check-files find-lang.sh macros.python pkgconfigdeps.sh script.req brp-python-bytecompile check-prereqs find-provides mkinstalldirs pythondeps.sh tgpg brp-python-hardlink check-rpaths find-requires mono-find-provides rpm2cpio.sh brp-strip check-rpaths-worker fontconfig.prov mono-find-requires rpm.daily brp-strip-comment-note config.guess libtooldeps.sh ocaml-find-provides.sh rpmdeps brp-strip-shared config.sub macros ocaml-find-requires.sh rpm.log brp-strip-static-archive desktop-file.prov macros.perl perl.prov rpmpopt-4.13.0.1

    Can anyone please tell me what I need to do to fix this ?
    Thanks​

    ------------------------------
    Dennis
    ------------------------------

    #AIXOpenSource


  • 2.  RE: yum fails because /var/lib/rpm/Packages is missing

    Posted Wed August 26, 2020 07:33 AM
    The link should be like this

    # ls -l /var/lib/rpm
    lrwxrwxrwx 1 root system 26 Aug 13 07:00 /var/lib/rpm -> /usr/opt/freeware/packages

    Was their any error while updating rpm.rte ?

    ------------------------------
    SANGAMESH
    ------------------------------



  • 3.  RE: yum fails because /var/lib/rpm/Packages is missing

    Posted Wed August 26, 2020 06:12 PM
    The only error reported when rpm.rte was installed is:

    cp: /usr/opt/freeware/bin/gendiff: There are too many levels of symbolic links to translate a path name.
    Converting old database format db1 to new database format db3.

    .. but it 'Successfully converted old database format to new format.'

    Can you tell me if the old 'rpm-3.0.5-46.ppc' needs to be removed ?

    ------------------------------
    Dennis Mathews
    ------------------------------



  • 4.  RE: yum fails because /var/lib/rpm/Packages is missing

    Posted Thu August 27, 2020 06:23 AM
    Yes. rpm-3.0.5-46.ppc should have been removed as there was the corresponding rpm.rte version provided.
    But i see this is owning rpm, cpio & gendiff  binary which it might remove it from the installed rpm.rte fileset.

    One option is to remove rpm-3.0.5-46.ppc and then reinstall the rpm.rte-4.13.0.11.

    ------------------------------
    SANGAMESH
    ------------------------------