Install swftools in Ubuntu / Linux

When I Installed swftools version 0.9.0 I got an error saying

make[1]: Entering directory `/home/ubuntu/swftools-0.9.0/swfs'
/bin/bash ../mkinstalldirs /usr/local/share/swftools
/bin/bash ../mkinstalldirs /usr/local/share/swftools/swfs
/usr/bin/install -c -m 644 ./simple_viewer.swf /usr/local/share/swftools/swfs/simple_viewer.swf
/usr/bin/install: cannot stat `./simple_viewer.swf': No such file or directory
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/ubuntu/swftools-0.9.0/swfs'
make: *** [install] Error 2

So I tried the version 0.9.1 and its done for me,

The Steps I followed is given below

Get necessary libraries and extract

  $ wget http://swftools.org/swftools-0.9.1.tar.gz
  $ tar -zvxf swftools-0.9.1.tar.gz
  $ wget http://www.ijg.org/files/jpegsrc.v7.tar.gz
  $ tar -zvxf jpegsrc.v7.tar.gz
  $ wget http://download.savannah.gnu.org/releases-noredirect/freetype/freetype-2.3.12.tar.gz
  $ tar -zvxf freetype-2.3.12.tar.gz

Now order of installation. First we install jpeg:

  $ cd jpegsrc.v7
  $ sudo ./configure
  $ sudo make
  $ sudo make install

Freetype is a little trickier. For installation you have to reset cache, set flags, run ranlib (not sure why but it wouldn’t work for me without this, if you know I’d love the explanation)

  $ cd freetype-2.3.12
  $ rm -f config.cache 
  $ sudo ranlib /usr/local/lib/libjpeg.a
  $ sudo ldconfig /usr/local/lib
  $ sudo LDFLAGS="-L/usr/local/lib" CPPFLAGS="-I/usr/local/include" ./configure
  $ sudo make
  $ sudo make install

If you want to be able to convert pdf files into text you have to install xpdf. Fortunately aptitude does provide us with the right libraries this time.

$ sudo apt-get install xpdf-reader

And now for the final step

  $ cd swftools-0.9.1
  $ sudo LDFLAGS="-L/usr/local/lib" CPPFLAGS="-I/usr/local/include" ./configure
  $ sudo make
  $ sudo make install

References:
https://designbye.wordpress.com/2010/02/23/installing-swftools-and-pdf2swf-on-ubuntu-linux/

Advertisements

Author: Abhi

Hi, this is Abhilash - Senior Programmer Analyst at CoMakeIT, specialised on web programming. Mainly working on Ruby On Rails platform since 2010.

2 thoughts on “Install swftools in Ubuntu / Linux”

  1. thank you so much, I’ve been fighting with swftools for the past three days and this seems to be the first solution out of many that has worked. Who would have thought that 0.9.1 is what I needed instead of 0.9.0

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s