Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm working on a kickstart script for a custom Scientific Linux ISO. However I am running into an issue with installing some programs from source.

Below is the general syntax I am trying. Where I will copy the .tgz file to the /tmp/ directory and then I will just have it execute the commands. When I do this logged into a computer, it works fine. However I believe when the kickstart script is trying to run it, it's not staying in the initial directory like I want it to. All of my rpm installs work fine due to it just being 1 command. Is there another method of how I should try to compile these?

%post --nochroot
cp -f nmap-6.01.tgz $INSTALL_ROOT/tmp/

%post
tar xzf /tmp/nmap-6.01.tgz -C /tmp/
cd /tmp/nmap-6.01 && ./configure && make && make install
rm -f /tmp/nmap-6.01.tgz
rm -rf /tmp/nmap-6.01

Thanks in advance.

Edit: For nmap I ended up getting the rpm and it worked fine. However there are still other programs I have to compile that I will need to figure this out for.

Edit2: I broke it down a little more and added some additional logging and this is what I see now.

configure: error: installation or configuration problem: C compiler cannot create executables

Then when I look at the actual config.log file I see this error.

collect2: cannot find 'ld'

and

It works fine when I'm logged in, so yet again it's something to do with how it's being built in the kickstart.

cd /tmp/nmap-6.01 && ./configure >> /tmp/nmap.log 2>> /tmp/nmap.log
cd /tmp/nmap-6.01 && make >> /tmp/nmap.log 2>> /tmp/nmap.log
cd /tmp/nmap-6.01 && make install >> /tmp/nmap.log 2>> /tmp/nmap.log
share|improve this question

1 Answer 1

Yeah, I was going to ask why you weren't using the distribution's nmap package.

The right answer if you're looking to distribute software that's source-only is to create your own RPM repository and distribute those packages as RPM's. E.g. build your own RPM's of the software you need to deploy.

But in general, for your specific setup, try breaking the build into multiple parts. Perhaps use some basic variables with full paths to the commands.

Edit:

And of course... you may not have all of the development tools you need in your installation environment...

share|improve this answer
    
Yeah I thought about that this morning and verified I had all of the packages in my build environment. I went ahead and added the full "Development Tools" package to be safe and still no luck. I'm making one last ditch effort and then just going to try to RPM them. –  Eric Nov 9 '12 at 15:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.