First, read notes about your OS:
TestDisk and PhotoRec use an ncurses interface, so ncurses library and development files must be present.
To be able to list files from Ext2/ext3, Reiser and NTFS partitions, some additionals libraries can be used:
For a better JPEG recovery rate, PhotoRec must be compiled with the libjpeg library.
To compile TestDisk and PhotoRec, run
./configure make
You may need to specify parameters to configure, see configure --help. Exemple
./configure --with-reiserfs-lib=/home/kmaster/perso/testdisk-5.2/progsreiserfs-0.3.1-rc8/libreiserfs/.libs/ --with-reiserfs-includes=/home/kmaster/perso/testdisk-5.2/progsreiserfs-0.3.1-rc8/include/ --with-ntfs-lib=/home/kmaster/perso/testdisk-5.2/ntfsprogs-1.8.5/libntfs/.libs/ --with-ntfs-includes=/home/kmaster/perso/testdisk-5.2/ntfsprogs-1.8.5/include/ --with-ext2fs-lib=/home/kmaster/perso/testdisk-5.2/e2fsprogs-1.34/lib --with-ext2fs-includes=/home/kmaster/perso/testdisk-5.2/e2fsprogs-1.34/lib
If you need to run the binary on systems that lack one of the previous libraries, create a static binary with
make static
If you need a small binary for binary distribution,
get the UPX packer at http://upx.sourceforge.net/
and run
make small upx src/testdisk src/photorec
Note that Linux UPX need decompress program file before run, what request some space on /tmp and running executable must be allowed in this directory (mount -o remount,exec /tmp).
Return to TestDisk page