Last active
February 7, 2024 02:47
-
-
Save Kelfitas/f3fb99984698ccd79414c6a29e9f4edd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo su | |
apt-get install -y autoconf automake libtool nasm make pkg-config | |
cd /tmp | |
wget https://github.com/mozilla/mozjpeg/releases/download/v3.1/mozjpeg-3.1-release-source.tar.gz | |
tar -xvf mozjpeg-3.1-release-source.tar.gz | |
cd mozjpeg | |
autoreconf -fiv | |
mkdir build && cd build | |
sh ../configure | |
make install | |
ln -s /opt/libmozjpeg/bin/jpegtran /usr/local/bin/mozjpeg |
I confirm I had also to add pkg-config
I had to use
ln -s /opt/mozjpeg/bin/jpegtran /usr/bin/mozjpeg
I know it's obvious but «gcc» or «clang» is mandatory.
In my case, i needed :
export LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
Another thing, «/tmp» is sometime mounted with «noexec» option (security reason) so it's better to do that in other directory, otherwise the «configure» step fail.
«make deb» produce an .deb, who can be cleaner to install/uninstall on system.
I belive its really bad idea to compile programs under root user. It might be better to minimize sudo commands, i.e.:
sudo apt-get install -y autoconf automake libtool nasm make pkg-config
cd /tmp
wget https://github.com/mozilla/mozjpeg/releases/download/v3.1/mozjpeg-3.1-release-source.tar.gz
tar -xvf mozjpeg-3.1-release-source.tar.gz
cd mozjpeg
autoreconf -fiv
mkdir build && cd build
sh ../configure
make
sudo make install
sudo ln -s /opt/mozjpeg/bin/jpegtran /usr/local/bin/mozjpeg
If anyone is looking for V4, please check this:https://gist.github.com/vikas5914/4affccdfa5c3a722808cd465f77866b9
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
maybe necessary to install pkg-config
apt-get install pkg-config