Welcome to the Linux Foundation Forum!

LAB 20.3 Build an RPM Package

Hello,
Can you pls explain how to do this lab step by step.
I've downloaded the LFS211/SOLUTIONS/s20/* .
I've got the following message after starting the script:

./myfirstrpm.sh
./myfirstrpm.sh: line 27: rpmbuild: command not found
You should have a new rpm file to install
and a new src rpm, check the following locations:
~/rpmbuild/SRPMS/myapprpm-1.0.0-1.src.rpm
~/rpmbuild/RPMS/x86_64/myapprpm-1.0.0-1.x86_64.rpm
You should be able to install the new program with:
sudo rpm -ivh ~/rpmbuild/RPMS/x86_64/myapprpm-1.0.0-1.x86_64.rpm

rpm -ivh ~/rpmbuild/RPMS/x86_64/myapprpm-1.0.0-1.x86_64.rpm
error: open of /root/rpmbuild/RPMS/x86_64/myapprpm-1.0.0-1.x86_64.rpm failed: No such file or directory

Thank you and regards,
Alexey

Comments

  • oops)
    i've solved the issue by installing "yum install gcc rpm-build"

    sorry and have a nice day!

  • coop
    coop Posts: 915

    If you were to run ./ready-for.sh --install LFS211 you would probably avoid any other problems with missing packages (If you don't already have the script, obtain it from https://training.linuxfoundation.org/cm/prep )

  • Just to add my 2 cents, gcc is like the mother of the binaries. We really need it to compile anything, and rpmbuild is the tool to build RPM packages.

    Regards,
    Luis.

Categories

Upcoming Training