This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
aix:rpm_install [2024/06/04 17:24] manu [RPM: create a package] |
aix:rpm_install [2025/06/03 18:05] (current) manu [RPM DB corrupt] |
||
---|---|---|---|
Line 166: | Line 166: | ||
====== RPM: create a package ====== | ====== RPM: create a package ====== | ||
+ | Compile your libraries and binaries and put them on the relative target path starting to /opt/freeware/src/packages/BUILD | ||
+ | |||
+ | Create a spec file with the files names | ||
<cli prompt='#'> | <cli prompt='#'> | ||
- | [root@labo]/opt/freeware/src/packages# /usr/bin/rpmbuild -bb SPECS/libssh2-1.11.1.spec | ||
- | Processing files: libssh2-1.11.1-2.ppc | ||
- | error: File not found: /var/tmp/libssh2-1.11.1-2.ppc/opt/freeware/lib/libssh2.a | ||
- | error: File not found: /var/tmp/libssh2-1.11.1-2.ppc/opt/freeware/lib64/libssh2.a | ||
- | |||
- | RPM build errors: | ||
- | File not found: /var/tmp/libssh2-1.11.1-2.ppc/opt/freeware/lib/libssh2.a | ||
- | File not found: /var/tmp/libssh2-1.11.1-2.ppc/opt/freeware/lib64/libssh2.a | ||
- | |||
[root@labo]/opt/freeware/src/packages# cat SPECS/libssh2\-1.11.1.spec | [root@labo]/opt/freeware/src/packages# cat SPECS/libssh2\-1.11.1.spec | ||
Name: libssh2 | Name: libssh2 | ||
Line 210: | Line 204: | ||
</cli> | </cli> | ||
+ | Test package creation, and adapt the file location (depnding from RPM generation!) | ||
<cli prompt='#'> | <cli prompt='#'> | ||
+ | [root@labo]/opt/freeware/src/packages# /usr/bin/rpmbuild -bb SPECS/libssh2-1.11.1.spec | ||
+ | Processing files: libssh2-1.11.1-2.ppc | ||
+ | error: File not found: /var/tmp/libssh2-1.11.1-2.ppc/opt/freeware/lib/libssh2.a | ||
+ | error: File not found: /var/tmp/libssh2-1.11.1-2.ppc/opt/freeware/lib64/libssh2.a | ||
+ | |||
+ | RPM build errors: | ||
+ | File not found: /var/tmp/libssh2-1.11.1-2.ppc/opt/freeware/lib/libssh2.a | ||
+ | File not found: /var/tmp/libssh2-1.11.1-2.ppc/opt/freeware/lib64/libssh2.a | ||
+ | |||
+ | |||
[root@labo]/opt/freeware/src/packages# mkdir -p /var/tmp/libssh2-1.11.1-2.ppc/opt/freeware/lib | [root@labo]/opt/freeware/src/packages# mkdir -p /var/tmp/libssh2-1.11.1-2.ppc/opt/freeware/lib | ||
[root@labo]/opt/freeware/src/packages# mkdir -p /var/tmp/libssh2-1.11.1-2.ppc/opt/freeware/lib64/ | [root@labo]/opt/freeware/src/packages# mkdir -p /var/tmp/libssh2-1.11.1-2.ppc/opt/freeware/lib64/ | ||
[root@labo]/opt/freeware/src/packages# cp BUILD/opt/freeware/lib/libssh2.a /var/tmp/libssh2-1.11.1-2.ppc/opt/freeware/lib | [root@labo]/opt/freeware/src/packages# cp BUILD/opt/freeware/lib/libssh2.a /var/tmp/libssh2-1.11.1-2.ppc/opt/freeware/lib | ||
[root@labo]/opt/freeware/src/packages# cp BUILD/opt/freeware/lib64/libssh2.a /var/tmp/libssh2-1.11.1-2.ppc/opt/freeware/lib64 | [root@labo]/opt/freeware/src/packages# cp BUILD/opt/freeware/lib64/libssh2.a /var/tmp/libssh2-1.11.1-2.ppc/opt/freeware/lib64 | ||
+ | </cli> | ||
+ | Now you are ready to build the RPM package | ||
+ | <cli prompt='#'> | ||
[root@systemh]/opt/freeware/src/packages# /usr/bin/rpmbuild -bb SPECS/libssh2\-1.11.1.spec | [root@systemh]/opt/freeware/src/packages# /usr/bin/rpmbuild -bb SPECS/libssh2\-1.11.1.spec | ||
Processing files: libssh2-1.11.1-2.ppc | Processing files: libssh2-1.11.1-2.ppc | ||
Line 325: | Line 333: | ||
====== ERRORS ====== | ====== ERRORS ====== | ||
+ | |||
+ | ===== YUM lua_newuserdata ===== | ||
+ | |||
+ | After upgrading the rpm package db4, RPMDB is corrupt | ||
+ | <cli prompt='#'> | ||
+ | root@devsrv - /mnt/rpm # yum update | ||
+ | There was a problem importing one of the Python modules | ||
+ | required to run yum. The error leading to this problem was: | ||
+ | |||
+ | rtld: 0712-001 Symbol lua_newuserdata was referenced | ||
+ | from module /usr/opt/rpm/lib/librpmio.so(), but a runtime definition | ||
+ | of the symbol was not found. | ||
+ | |||
+ | 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.7.18 (default, Dec 15 2022, 05:12:43) | ||
+ | [GCC 8.3.0] | ||
+ | |||
+ | If you cannot solve this problem yourself, please go to | ||
+ | the yum faq at: | ||
+ | http://yum.baseurl.org/wiki/Faq | ||
+ | </cli> | ||
+ | |||
+ | uninstall the packages yum (rpm -qa | grep yum) | ||
+ | <code> | ||
+ | yum-metadata-parser-1.1.4-2.ppc | ||
+ | yum-3.4.3-8.noarch | ||
+ | </code> | ||
+ | |||
+ | Download and install the DNF bundle instead from https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/ezinstall/ppc/ | ||
+ | |||
+ | <cli prompt='#'> | ||
+ | root@devsrv - /mnt/dnf_bundle_aix_71_72_v8# ./install_dnf.sh -d | ||
+ | </cli> | ||
===== RPM DB corrupt ===== | ===== RPM DB corrupt ===== |