HowTo: Rebuild a Debian package for ARM (nginx)


2 posts
by KazW » Tue Jun 26, 2012 5:23 am
For those looking to install the latest version of nginx on squeeze here are two options (Option 2 should work for most packages as long as as there's a deb-src repo or package):
Option 1 - Download
Download the package I compiled on a Pi earlier tonight:
Code: Select all
wget http://dl.dropbox.com/u/87792204/nginx_1.2.1-1~squeeze_armel.deb
Verify Download:
Code: Select all
md5sum nginx_1.2.1-1~squeeze_armel.deb
3284746b2470bea853c8c590072e4b52  nginx_1.2.1-1~squeeze_armel.deb
Install the package:
Code: Select all
sudo dpkg -i nginx_1.2.1-1~squeeze_armel.deb
Option 2 - Compile from source (takes 45-60 minutes)
Compile your own version the way I did:

Edit package sources:
Code: Select all
sudo nano /etc/apt/sources.list
Add the following lines to the bottom:
Code: Select all
deb http://nginx.org/packages/debian/ squeeze nginx
deb-src http://nginx.org/packages/debian/ squeeze nginx
Add the nginx key (Probably not necessary):
Code: Select all
deb http://nginx.org/packages/debian/ squeeze nginx
deb-src http://nginx.org/packages/debian/ squeeze nginx
Setup a source directory to fetch and build the package in:
Code: Select all
mkdir nginx_src
cd nginx_src
Update APT, install build tools and get/build the source:
Code: Select all
sudo apt-get update
sudo apt-get upgrade
sudo apt-get -y install build-essential debhelper libpcre3-dev
sudo apt-get -b source nginx
Install the package:
Code: Select all
sudo dpkg -i nginx_1.2.1-1~squeeze_armel.deb
Posts: 9
Joined: Mon Jun 25, 2012 5:23 am
Location: Calgary, Alberta, Canada
by neil2909 » Mon Jul 02, 2012 12:39 pm
Hi KazW
Could not do your step 1 method kept getting file not found.

Step 2 the add key code is the same as the lines above. and I kept getting a child returned an error with this command "sudo apt-get -y install build-essential debhelper libpcre3-dev"

but found this site http://www.joscandreu.com/post/22439909883/install-nginx-on-raspberrypi which help get it running in a few minutes.

Stil a great post gave me the push to have a go.
Posts: 26
Joined: Sun Jul 01, 2012 7:23 am