How to install optipng on Ubuntu from source

Optipng is in the Ubuntu repositories but is you want an up to date version then it can be worth installing Optipng from source. This is essentially a script but you can use the commands on there own if you want.

wget --quiet http://downloads.sourceforge.net/project/optipng/OptiPNG/optipng-0.7.3/optipng-0.7.3.tar.gz
tar xf optipng-0.7.3.tar.gz

cd /root/scripts/optipng-0.7.3
./configure > /dev/null 2>&1
make > /dev/null 2>&1

cp /root/scripts/optipng-0.7.3/src/optipng/optipng /usr/bin/
ln -s /usr/local/bin/optipng /usr/bin/optipng

rm /root/scripts/optipng-0.7.3.tar.gz
rm -rf /root/scripts/optipng-0.7.3

One thought on “How to install optipng on Ubuntu from source

Leave a Reply