Author Topic: Installing nasm  (Read 11855 times)

Offline siaswar

  • New Member
  • Posts: 1
Installing nasm
« on: July 29, 2010, 05:19:50 AM »
I download the "nasm-2.08.99.94-1.i386" and trying to install it in a fedora11 but it's require some package befor nasm.
I don't know how to download the requires. is there another way to install nasm?

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2437
  • Country: us
Re: Installing nasm
« Reply #1 on: July 29, 2010, 07:47:16 AM »
Download the source:

http://www.nasm.us/pub/nasm/releasebuilds/2.09rc5/nasm-2.09rc5.tar.bz2

Code: [Select]

tar jxf nasm-2.09rc5.tar.bz2

cd nasm-2.09rc5

./configure

make install_everything


That's how I do it. You'll have to be root for the last part ("su", "sudo", however you do it). You should be ready to assemble. I'm not familiar with fedora11. If it doesn't go smoothly, get back to us... maybe someone has a better idea.

I guess you're "supposed" to do it from the .rpm. I guess you're "supposed" to find, download, and install the package(s !) it's looking for. I guess most distros have some kind of "package installer" ("sudo apt-get nasm install" for Ubuntu, I think), which is probably easier if you know how to do it. I've always had the best results building it from source. YMMV.

Best,
Frank


Offline Bryant Keller

  • Forum Moderator
  • Full Member
  • *****
  • Posts: 360
  • Country: us
    • About Bryant Keller
Re: Installing nasm
« Reply #2 on: July 29, 2010, 07:20:06 PM »
Here is an "installer" that should work on just about any linux system. Only dependency is 'wget' and and that is something installed on just about any linux box anyway:

Code: [Select]
#!/bin/bash
# getnasm.sh

if [[ $(/usr/bin/id -u) -ne 0 ]]; then
echo "getnasm.sh requires root"
exit
fi

if [ "$1" == "" ] ; then
echo "usage: getnasm.sh <VERSION>"
exit
else
NVERSION=$1
fi

# Download And Install
wget http://www.nasm.us/pub/nasm/releasebuilds/$NVERSION/nasm-$NVERSION.tar.bz2
tar xvf nasm-$NVERSION.tar.bz2
rm -rf nasm-$NVERSION.tar.bz2
cd nasm-$NVERSION
./configure && make && make install && make spotless
cd ..

#Installation Complete.
exit

This script takes the version of NASM you wish to install as an argument to the script and downloads, unpackages, builds, installs, and cleans-up after itself (leaving the source directory in the event that you wish to make any changes like custom standard macros).

Quote
bash-4.1$ ./getnasm.sh
getnasm.sh requires root
bash-4.1$ sudo su
bash-4.1# ./getnasm.sh
usage: getnasm.sh <VERSION>
bash-4.1# nasm -v
NASM version 0.99.05 compiled on Jul 29 2010
bash-4.1# ./getnasm.sh 2.09rc5
.... Lots of build stuff .....
bash-4.1# nasm -v
NASM version 2.09rc5 compiled on Jul 29 2010

About Bryant Keller
bkeller@about.me