DanieBlog - This article will guide you how to install Mozjpeg in Linux Mint 19.
If you do not know what Mozjpeg is, you will know one more useful software through this article.
What is the Mozjpeg project?
Mozjpeg is a project of Mozilla. According to the homepage:
MozJPEG reduces file sizes of JPEG images while retaining quality and compatibility with the vast majority of the world’s deployed decoders.
You can read more about Mozjpeg’s features at this github link.
Basically for me, I use it to compress the images that I will upload to my blog.
Step-by-step to install Mozjpeg in Linux Mint 19
This section will present you step by step how to install Mozjpeg successfully on Linux Mint 19.
Install dependent packages
This software will need some of the following dependencies to work:
Now type the following command to install those dependencies.
danie@linux:~$ sudo apt-get install autoconf automake libtool nasm make -y
Download the source code
You can select their installed versions at this link, because the version may vary over time.
At the time I wrote this article, Mozjpeg has version v3.3.1.
Now type the following command to download and extract the source code.
Recommended Reading: How to install Pycharm community in Linux Mint
danie@linux:~$ cd /tmp danie@linux:~$ wget https://github.com/mozilla/mozjpeg/archive/v3.3.1.tar.gz danie@linux:~$ tar -xzf v3.3.1.tar.gz
Compile and install the source code
First, move to the unzipped folder of the source code.
danie@linux:~$ cd mozjpeg-3.3.1/
Next, use the
autoreconf command to create the configure file for the source code.
danie@linux:~$ autoreconf -fiv
And then, you create the
build directory to contain the installation files. Move into the build directory.
danie@linux:~$ mkdir build && cd build
configure file to create the Makefile, which will be used to install the final program on your computer.
danie@linux:~$ sh ../configure
And finally, run
make install with
sudo permissions so that it installs Mozjpeg into the
/opt folder in your computer.
danie@linux:~$ sudo make install
Recommended Reading: Install Tomate pomodoro software on Linux
Now, type the following command to see the executable files of Mozjpeg installed on your computer.
danie@linux:~$ ls /opt/mozjpeg/bin/ cjpeg djpeg jpegtran rdjpgcom tjbench wrjpgcom
There is a problem, if you want to use, for example
jpegtran, you will have to type the command like this.
danie@linux:~$ /opt/mozjpeg/bin/jpegtran --help
Instead of typing such a command, we will create a link for easier use, we name it
mozjpeg to make it easier to remember.
danie@linux:~$ sudo ln -s /opt/mozjpeg/bin/jpegtran /usr/local/bin/mozjpeg
Now you just need to type the command like this.
danie@linux:~$ mozjpeg --help
So the article has guided you step by step to successfully install the Mozjpeg tool in Linux Mint 19. I believe these installation steps will also work well on both new Ubuntu and Debian versions.If you liked this article, then please subscribe to our YouTube Channel for more video tutorials. You can also find us on Twitter and Facebook.
If you appreciate what we share in this blog, you can support us by:
- Stay connected to: Facebook | Twitter | Google Plus | YouTube
- Subscribe email to recieve new posts from us: Sign up now.
- Start your own blog with SSD VPS - Free Let's Encrypt SSL ($2.5/month).
- Become a Supporter - Make a contribution via PayPal.
- Support us by purchasing Ribbon Lite Child theme being using on this website.
We are thankful for your support.