Compiling TrueCrypt on Fedora 9: Remember, RTFM

Here is the cheatsheet for those who do not like to read.  Just open up a terminal and open the directory with the TrueCrypt 6.1a’s source tar.  Copy and paste the following command string and you should be golden:

sudo yum install fuse-devel gcc-c++ gnome-keyring-manager make pkgconfig nss-pkcs11-devel wget wxGTK-devel;tar -xvzf TrueCrypt 6.1a Source.tar.gz;cd truecrypt-6.1a-source;wget ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11.h;wget ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11f.h;wget ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11t.h;make;sudo cp Main/truecrypt /bin/

I decided I need TrueCrypt to store some personal documents that I do not want people find (tax forms, employment information, etc).  Unfortunately, the bastards who make TrueCrypt make an rpm for only one Redhat-based distribution, OpenSUSE, and have very strict license rules about repackaging and/or modifying their code.  As much as I want to spend time complaining about their preferred choice of distro, I shall not.  What I will do is give a brief summation of how to compile TrueCrypt 6.1a on Fedora 9.

First of all, I want to point out you should always read the manual (as the title politely hints at).  I always think I am “above” this step, and I always learn my lesson.  I read this tutorial, but I still had problems.  Just in case you were wondering, these are the requirements listed in the README page bundled with 6.1a’s source:

Requirements for Building TrueCrypt for Linux and Mac OS X:
———————————————————–

– GNU Make
– GNU C++ Compiler 4.0 or compatible
– Apple XCode (Mac OS X only)
– pkg-config
– wxWidgets 2.8 shared library and header files installed or
wxWidgets 2.8 library source code (available at http://www.wxwidgets.org)
– FUSE library and header files (available at http://fuse.sourceforge.net
and http://code.google.com/p/macfuse)
– RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki) 2.20
header files (available at ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20)
located in a standard include path or in a directory defined by the
environment variable ‘PKCS11_INC’.

If I had read these, I would not have the problems I eventually encountered.

The first time I compiled, I downloaded the wxGTK 2.8.10 library source from the project’s website as the tutorial suggested, but I had compilation errors complaining about missing constants, clearly for the wxGTK library.  So, I decided to use the RPM provided by yum instead the second time around.

The second time I received compilation errors since because I was missing the RSA PKCS-11 header files.  If I had read the README file prior to compilation and Googling, I would not have embarassed myself.  So, without further ado, here are the quick and easy steps I used to compiled TrueCrypt 6.1a on Fedora 9.

  1. Download the TrueCrypt source from here.
  2. Open up a terminal, and open up the directory containing the TAR file of TrueCrypt’s source.
  3. Input the following commands:

sudo yum install fuse-devel gcc-c++ gnome-keyring-manager make pkgconfig nss-pkcs11-devel wget wxGTK-devel

tar -xvzf TrueCrypt 6.1a Source.tar.gz

cd truecrypt-6.1a-source

wget ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11.h

wget ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11f.h

wget ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11t.h

make

sudo cp Main/truecrypt /bin/

So, about these commands.  I tried using yum as suggested in Januz’s more recent tutorial to use RPM’s instead of having to directly download the PKCS-11 header files, but to no avail.  That is why I download the header files using wget.  I also suggest installing gnome-keyring-manager with the expectation you will eventually have to manage your keys (for TrueCrypt, or even for your wireless networks).  Let me know if this worked well for any of you.


About this entry