SWFTools (a collection of utilities for working with Adobe Flash files, SWF files) was removed from the Ubuntu repository for some security problem with the PDF library used (I don’t remember exactly, anyway it’s not the point…).

If you need to use SWFTools, you have to build it from the sources (you need to be familiar with the terminal and some basic Linux procedures).

First, prepare the environment for source compilation:

sudo apt-get install build-essential checkinstall

Then, install some dependencies:

sudo apt-get install libgif-dev xpdf libfreetype6 libfreetype6-dev libjpeg62 libjpeg8 libjpeg8-dev

Download the SWFTools package and uncompress it…

cd /tmp/
wget http://www.swftools.org/swftools-0.9.2.tar.gz
tar zxvf swftools-0.9.2.tar.gz 
cd swftools-0.9.2/

Now you have to add to the sources the xpdf package

cd lib/pdf
wget ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.04.tar.gz

Then, build the sources

cd ../..

Now you have to edit this file “swfs/Makefile” to comment 2 lines (otherwise the installation script won’t work). You have to comment “rm -f $(pkgdatadir)/swfs/default_viewer.swf -o -L $(pkgdatadir)/swfs/default_viewer.swf” and “rm -f $(pkgdatadir)/swfs/default_loader.swf -o -L $(pkgdatadir)/swfs/default_loader.swf“, like the following:

        $(mkinstalldirs) $(pkgdatadir)
        $(mkinstalldirs) $(pkgdatadir)/swfs
        $(INSTALL_DATA) ./simple_viewer.swf $(pkgdatadir)/swfs/simple_viewer.swf
        $(INSTALL_DATA) ./keyboard_viewer.swf $(pkgdatadir)/swfs/keyboard_viewer.swf
        $(INSTALL_DATA) ./PreLoaderTemplate.swf $(pkgdatadir)/swfs/PreLoaderTemplate.swf
        $(INSTALL_DATA) ./tessel_loader.swf $(pkgdatadir)/swfs/tessel_loader.swf
        $(INSTALL_DATA) ./swft_loader.swf $(pkgdatadir)/swfs/swft_loader.swf
        #rm -f $(pkgdatadir)/swfs/default_viewer.swf -o -L $(pkgdatadir)/swfs/default_viewer.swf
        $(LN_S) $(pkgdatadir)/swfs/simple_viewer.swf $(pkgdatadir)/swfs/default_viewer.swf
        #rm -f $(pkgdatadir)/swfs/default_loader.swf -o -L $(pkgdatadir)/swfs/default_loader.swf
        $(LN_S) $(pkgdatadir)/swfs/tessel_loader.swf $(pkgdatadir)/swfs/default_loader.swf

You can install SWFTools running this last command:

sudo checkinstall

Insert the name of the package (SWFTools) when prompted by checkinstall and follow the procedure as usual.


EB · December 30, 2014 at 13:37

Thank you SO MUCH!!!

zpu · April 22, 2015 at 03:52

Thank you very much! It worked like a charm!

muhim · April 23, 2015 at 03:32

thank you so much,this make linux be better and better

mn · December 5, 2015 at 15:50

But I had to edit “swfs/Makefile” after “./configure” and before “make”

mark · April 19, 2017 at 18:05

Your instructions are great until you get to the Makefile – from there on, the entire build crumbles between the fingers.

User the repository to install it instead.

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *