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
  $ tar -zvxf swftools-0.9.1.tar.gz
  $ wget
  $ tar -zvxf jpegsrc.v7.tar.gz
  $ wget
  $ 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



Author: Abhilash

I'm Abhilash, a web developer who specializes in Ruby development. With years of experience working with various frameworks like Rails, Angular, Sinatra, Laravel, NodeJS, React and more, I am passionate about building robust and scalable web applications. Since 2010, I have been honing my skills and expertise in the Ruby on Rails platform. This blog is dedicated to sharing my knowledge and experience on topics related to Ruby, Ruby on Rails, and other subjects that I have worked with throughout my career. Join me on this journey to explore the exciting world of web development!

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: Logo

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

Facebook photo

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

Connecting to %s

%d bloggers like this: