Build and install mcrypt libmcrypt package for Slackware Linux

The mcrypt is a Linux tool that allows user to use a wide range of encryption functions in Linux system. It replaces the previous crypt package and crypt command which is a well known command for encrypt and decrypt file. This tutorial is a guide on how to create Slackware package and install mcrypt and libmcrypt package in Slackware Linux. You need to install libmcrypt package before installing mrypt package. Otherwise, you'll get an error of missing mcrypt library.The easiest way to create a Slackware package is to get libmcrypt and mcrypt's slackbuild script from SlackBuild website. For the latest mcrypt and libmcrypt sources, you can download them from Sourceforge website.

When you have mcrypt and libmcrypt in your computer (slackbuild scripts and sources), copy them to the proper build directory. Here is step by step example as your guide.

Build Slackware libmcrypt package

1) Change to a specific directory to build Slackware package. Extract libmcrypt.tar.gz, which contains slackbuild scrips that you download from Slackbuild website:

[email protected]:~# cd /home/slackware/source/myslackware/
[email protected]:/home/slackware/source/myslackware# tar zxvf /home/slackware/build/libmcrypt/libmcrypt.tar.gz

2) Copy libmcrypt source to the slackbuild extracted directory (libmcrypt):

[email protected]:/home/slackware/source/myslackware# cp /home/slackware/source/libmcrypt-2.5.8.tar.bz2 libmcrypt/

3) Change directory to the libmcrypt build directory and run libmcrypt.SlackBuild script:

[email protected]:/home/slackware/source/myslackware# cd libmcrypt/
[email protected]:/home/slackware/source/myslackware/libmcrypt# ./libmcrypt.SlackBuild

The build package process only takes a few seconds. You can find the complete Slackware libmcrypt package result in the /tmp directory (default slackbuild configuration).

Install Slackware libmcrypt package

Change to the /tmp directory and run installpkg command to install libmcrypt package. You can keep a copy of Slackware libmcrypt package as a backup.

[email protected]:/home/slackware/source/myslackware/libmcrypt# cd /tmp/
[email protected]:/tmp# installpkg libmcrypt-2.5.8-i486-1_SBo.tgz
Installing package libmcrypt-2.5.8-i486-1_SBo...
PACKAGE DESCRIPTION:
libmcrypt: libmcrypt (encryption functions for MCrypt)
libmcrypt:
libmcrypt: mcrypt is a program for encrypting files or streams. It is intended
libmcrypt: to be a replacement for the old UNIX crypt. It uses well-known and
libmcrypt: well-tested algorithms like BLOWFISH, AES, ARCFOUR, CAST-128, and
libmcrypt: more in several modes or operation.
libmcrypt:
libmcrypt: Homepage: http://freshmeat.net/projects/mcrypt/
libmcrypt:
Executing install script for libmcrypt-2.5.8-i486-1_SBo...

[email protected]:/tmp# cp libmcrypt-2.5.8-i486-1_SBo.tgz /home/slackware/packages/

Build Slackware mcrypt package

The steps to build Slackware mcrypt package is the same as building libmcrypt package example above. First extract the mcrypt slackbuild script:

[email protected]:/tmp# cd /home/slackware/source/myslackware/
[email protected]:/home/slackware/source/myslackware# tar zxvf /home/slackware/build/mcrypt/mcrypt.tar.gz
mcrypt/
mcrypt/README
mcrypt/slack-desc
mcrypt/mcrypt.SlackBuild
mcrypt/mcrypt.info

2) Copy mcrypt source to the slackbuild extracted directory:

[email protected]:/home/slackware/source/myslackware# cp /home/slackware/source/mcrypt-2.6.8.tar.gz mcrypt/

3) Change directory to the mcrypt build directory (extracted directory - mcrypt) and run mcrypt.SlackBuild script:

[email protected]:/home/slackware/source/myslackware# cd mcrypt/
[email protected]:/home/slackware/source/myslackware/mcrypt# ./mcrypt.SlackBuild

If there is no error, then we can have the Slackware mcrypt package in the /tmp directory.

Install Slackware mcrypt package

As we did in the Slackware libmcrypt package installation above, change directory to /tmp directory and install the mcrypt package.

[email protected]:/home/slackware/source/myslackware/mcrypt# cd /tmp
[email protected]:/tmp# installpkg mcrypt-2.6.8-i486-1_SBo.tgz
Installing package mcrypt-2.6.8-i486-1_SBo...
PACKAGE DESCRIPTION:
mcrypt: mcrypt (simple encryption app)
mcrypt:
mcrypt: Mcrypt is a simple encryption program, intended to be
mcrypt: a replacement for the old unix crypt.
mcrypt:
mcrypt: Home Page http://mcrypt.sourceforge.net
mcrypt:
Executing install script for mcrypt-2.6.8-i486-1_SBo...

[email protected]:/tmp#

Keep a copy of Slackware mcrypt in your Slackware packages directory.

[email protected]:/tmp# cp mcrypt-2.6.8-i486-1_SBo.tgz /home/slackware/packages/

That's all. Here is the result package of the example above if you don't have time to build one for yourself. However, www.basicconfig.com and the writer do not responsible for any harm done to your system. By using this package, you are agreed to the Web Site Agreement. Use it at your own risk.

Download Slackware 12.2 mcrypt-2.6.8-i486-1_SBo.tgz package.

Download Slackware 12.2 libmcrypt-2.5.8-i486-1_SBo.tgz package.

Add new comment