Linux HOWTOs

About | Home | Search


HOWTO: nasm
Description: The Netwide Assembler
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything


# NASM 2.07
# =========
# Slackware 11.0, 12.0, 12.1: nasm 0.98.39
# Slackware 12.2: nasm 2.03.01

# Prerequisites:
# groff or nroff

# If you have trouble downloading it from the URL below, try here instead:
# http://download.sf.net/nasm/nasm-2.07.tar.bz2
# http://prdownloads.sf.net/nasm/nasm-2.07.tar.bz2

cd
test -f installed/nasm-2.07.tar.bz2 && mv installed/nasm-2.07.tar.bz2 .
test ! -f nasm-2.07.tar.bz2 &&
 wget http://downloads.sf.net/nasm/nasm-2.07.tar.bz2
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "nasm-*" -exec rm -r {} \;
tar xjvf ~/nasm-2.07.tar.bz2
cd nasm-2.07
test $UID = 0 && chown -R root:root .
./configure --prefix=/usr --mandir=/usr/man
make

# If you want to strip the executables
make strip

# Become root to install it
su

# Remove the Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg nasm

# Install it
make install

# Make sure your non-root user can remove the source later
chown -R $USER .
chmod -R u+w .

# Become yourself again
exit

cd
mkdir -p -m 0700 installed
rm -f installed/nasm-*.tar.*
mv nasm-2.07.tar.bz2 installed/


# If you ever need to uninstall nasm, try this:
su
( cd /usr/bin ; rm -f nasm ndisasm )
rm -f /usr/info/nasm.info*
( cd /usr/man/man1 ; rm -f nasm.1 nasm1.gz ndisasm.1 ndisasm.1.gz )
exit
rm -f ~/installed/nasm-*.tar.*
find ~/src -maxdepth 1 -type d -name "nasm-*" -exec rm -r {} \;

Back to the list


Last updated: Tue, 07 Aug 2018 12:06:17 -0400
Jason Englander <jason at englanders dot us>