/QOpenSys/opt/freeware/lib/librpm.so.0.0.0 not found

Issue #10 resolved
PHPDave created an issue

Was wondering if you guys ran into the same issue.

I tried to run

$ ./pkg_setup.sh pkg_perzl_gcc-4.6.2.lst 

But its having a problem loading librpmbuild.so. librpmbuild.so is a symbolic link to librpm.so.0.0.0 . That file (librpm.so.0.0.0) isn't copied into the chroot directory when you run

$ ./chroot_setup.sh chroot_minimal.lst /QOpenSys/ranger

I also had to run

PATH=$PATH:/QOpenSys/opt/freeware/lib 

to get the librpm.so to be included since the path is only set to /QOpenSys/usr/bin

Full output w/ error

$ ./pkg_setup.sh pkg_perzl_gcc-4.6.2.lst 
message: libiconv-1.14-2.aix5.1.ppc.rpm - previously downloaded
install libiconv-1.14-2.aix5.1.ppc.rpm ...
Could not load program rpm:
        Dependent module librpmbuild.so could not be loaded.
Could not load module librpmbuild.so.
System error: No such file or directory
fixing /opt/freeware/lib/libiconv.a ...

Notes

To find out librpmbuild.so was a symlink

ls -l /QOpenSys/opt/freeware/lib/

To find out the librpm.so.0.0.0 is missing

$ ls -l /QOpenSys/opt/freeware/lib/librpm.so.0.0.0
/QOpenSys/opt/freeware/lib/librpm.so.0.0.0 not found

RPM binary is found here: /QOpenSys/usr/bin/rpm

Comments (15)

  1. PHPDave reporter

    Must of been a permissions issue or something. I just copied the missing files from /QOpenSys/opt/freeware/lib to /QOpenSys/username/QOpenSys/opt/freeware/lib

  2. Former user Account Deleted

    completely confusing ...

    Do not use PATH=$PATH:/QOpenSys/opt/freeware/lib
    instead use ...
    PATH=$PATH:/QOpenSys/opt/freeware/bin
    LIBPATH=$LIBPATH:/QOpenSys/opt/freeware/lib
    

    Mmm , rpm should sort of always work, but, not sure what to make of anything after watching the PATH/LIBPATH issue.

  3. Former user Account Deleted

    I am also having a lot of difficulty understanding if you are inside/outside your chroot with /pkg_setup.sh???

  4. Former user Account Deleted

    Nothing meant to be offensive, just trying to see if we have a script issue or a doicumentation issue.

  5. Former user Account Deleted

    we did change the rpm setup in chroot_setup.sh ... so maybe post a little more about the order of events ...

  6. Former user Account Deleted

    here is a complete sequence that worked fine for my machine ...

    ============
    outside chroot
    ============
    bash-4.3$ cd /QOpenSys/QIBM/ProdData/OPS/GCC  (where you downloaded)
    bash-4.3$ PATH=/QOpenSys/usr/bin
    bash-4.3$ LIBPATH=/QOpenSys/usr/lib
    bash-4.3$ echo $PATH
    /QOpenSys/usr/bin
    bash-4.3$ echo $LIBPATH
    /QOpenSys/usr/lib
    bash-4.3$ ./chroot_setup.sh chroot_minimal.lst /QOpenSys/ranger3
    :
    bash-4.3$ ./chroot_setup.sh chroot_OPS_GCC.lst /QOpenSys/ranger3
    :
    =============
    inside chroot
    =============
    bash-4.3$ chroot /QOpenSys/ranger3 /QOpenSys/usr/bin/bsh
    $ cd /QOpenSys/QIBM/ProdData/OPS/GCC
    $ ./pkg_setup.sh pkg_perzl_utils.lst
    setup rpm.rte ...
    setup wget-1.9.1-1.aix5.1.ppc.rpm ...
    :
    libidn                      ##################################################
    zlib                        ##################################################
    pcre                        ##################################################
    readline                    ##################################################
    openssl                     ##################################################
    libssh2                     ##################################################
    openldap                    ##################################################
    info                        ##################################################
    bash                        ##################################################
    sed                         ##################################################
    grep                        ##################################################
    nedit                       ##################################################
    bzip2                       ##################################################
    gzip                        ##################################################
    unzip                       ##################################################
    zip                         ##################################################
    tar                         ##################################################
    $ rpm --version
    RPM version 3.0.5
    
  7. PHPDave reporter

    @rangercairns Might be nice to have a chroot_remove.sh to uninstall the symlinks and remove the copied files for cases where you want to start from scratch again

  8. Former user Account Deleted

    Understand ...

    I use this to destroy (careful) ...

    rm -R /QOpenSys/ranger
    
    or more safely ...
    
    cd /QOpenSys
    rm -R ranger
    
  9. Aaron Bartell

    Similar to Tony I've created groupings of commands I can use to quickly/iteratively test our work. Here's mine:

    5250> CRTUSRPRF USRPRF(E01) PASSWORD(DCVER32R1) INLMNU(*SIGNOFF) USRCLS(*USER) HOMEDIR('/QOpenSys/download/ibmichroot/spaces/e01/./home/E01') LOCALE(*NONE) TEXT('ibmichroot tests')
    
    env_name=e01
    usr_name=E01
    env_path=/QOpenSys/download/ibmichroot/spaces/$env_name
    ./chroot_setup.sh chroot_minimal.lst $env_path
    mkdir -p $env_path/home/$usr_name
    # Copy my `aaron` profile .ssh for password-less ssh login into E01's folder.
    cp -R ~/.ssh $env_path/home/$usr_name
    # ssh doesn't work unless directories/files have specific permissions
    chmod 700 $env_path/home/$usr_name/.ssh
    chmod 600 $env_path/home/$usr_name/.ssh/id_rsa
    chmod 644 $env_path/home/$usr_name/.ssh/id_rsa.pub
    chmod 644 $env_path/home/$usr_name/.ssh/authorized_keys
    # Copy in necessary ibmichroot stuff to install packages.
    mkdir -p $env_path/home/ibmichroot
    cp pkg_setup.sh $env_path/home/ibmichroot
    cp pkg_perzl_bash-4.3.lst $env_path/home/ibmichroot
    cp pkg_perzl_utils.lst $env_path/home/ibmichroot
    cp pkg_perzl_git-1.8.5.4.lst $env_path/home/ibmichroot
    cp rpm.rte $env_path/home/ibmichroot
    cp wget-1.9.1-1.aix5.1.ppc.rpm $env_path/home/ibmichroot
    # I pre-download many `xxxx.rpm` files and copy them all in, and the delete them when done.
    cp -R rpm/* $env_path/home/ibmichroot
    
    # Single command to do install of particular pkg_xxxx.lst
    chroot $env_path /usr/bin/sh -c 'cd /home/ibmichroot && ./pkg_setup.sh pkg_perzl_utils.lst'
    chroot $env_path /usr/bin/sh -c 'cd /home/ibmichroot && ./pkg_setup.sh pkg_perzl_git-1.8.5.4.lst'
    chown -Rh $usr_name:0 $env_path
    

    Then to clear it out and try again:

    rm -rf /QOpenSys/download/ibmichroot/spaces/e01
    
  10. PHPDave reporter

    Thanks @rangercairns and @aaronbartell I got through the quick example and verified i can compile with GCC! Time to see about compiling PHP7

    bash-4.3$ cat hello.c 
    /* hello.c -- The most famous program of them all ..
     */
    
    #include <stdio.h>
    
    int main(void) {
      printf("Hello World!\n");
      // return 0; 
    }
    bash-4.3$ gcc hello.c
    bash-4.3$ ls
    a.out    hello.c
    bash-4.3$ ./a.out
    Hello World!
    
  11. Log in to comment