RPM build error

I needed help debugging my rpm build. Each time it encounters the directive% files or% build or% install, it gives me an error, and I can’t understand what β€œ[rpm] + $ '\ r'” means

[rpm] Building the RPM based on the LBR.spec file [rpm] Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.2932 [rpm] + umask 022 [rpm] + cd /home/user.username/workspace/LBR/dist/BUILD [rpm] + LANG=C [rpm] + export LANG [rpm] + unset DISPLAY [rpm] + $'\r' [rpm] /var/tmp/rpm-tmp.2932: line 28: [rpm] : command not founderror: Bad exit status from /var/tmp/rpm-tmp.2932 (%build) [rpm] Bad exit status from /var/tmp/rpm-tmp.2932 (%build) [rpm] [rpm] [rpm] RPM build errors: 
+4
source share
2 answers

I know it's almost four years, but for anyone who might stumble upon this page, as if I was looking for a solution:

I had the same problem when a carriage return character was inserted into an rpmbuild automatically generated tempo script. The reason this happens is because I initially edited the specification file in a Windows text editor (which inserted the carriage return) and then the SCPed files in the CentOS field, so the carriage returns errors. If you remake the file in Linux, it should work fine.

Good luck

EDIT: I am very new to Linux, so I didn’t know that there was a command called dos2unix that would convert the text file accordingly for Unix based environments. :) Hope this helps someone else who is facing this problem .

+6
source

A little late ... but ...

After vi / assembly fails, open the file / var / tmp / rpm -tmp.2932 (or something else for this assembly) and go to line 28. Regardless of which command is on this line, From this output, probably it's "$ '\ r", which is a fake, not a command or a valid statement ... so you probably have a typo or something like that.

Did you say that this was due to% build,% install and% files? What is the build command you create?

+2
source

All Articles