User Tools

Site Tools

Building Frida

This page is part of the Frida online handbook. It describes the standard procedure to download, compile, and install Frida2.

See also:

  • frida.ini: local set up
  • git: alternative download and build procedure, using the development tree


Operating systems
  • Linux. Our standard environment is Debian. Please report if there are difficulties with other distributions.
Required packages

To compile the sources, one needs the compilation tools

  • make
  • g++ (GNU C++ compiler)
  • bison
  • flex

and the libraries (-dev packages)

  • readline (at least version 4.3)
  • history (may come with package libreadline-dev)
  • gsl
  • blas (required by gsl)
  • fftw3
  • boost (modules shared_ptr, regex, date_time)

At runtime, one external program is needed:

  • gnuplot

In Debian/Ubuntu, the following command installs all required packages:

sudo aptitude install \
  make \
  g++ \
  bison \
  flex \
  libreadline-dev \
  libgsl0-dev \
  libfftw3-dev \
  libboost-regex-dev \
  libboost-date-time-dev \

Other required packages are automatically installed through dependencies. In particular, each development package (-dev, containing the .h files) depends on a library package that contains the corresponding shared library.

The libboost regex and date-time development packages depend on libboost-dev which contains, among others, the shared pointer module (which is implemented through .h files only; no shared library).

There may be some incompatibility between g++ and libboost versions. Proven combinations are

  • libboost1.40 or 1.42 with g++-4.4;
  • libboost1.34 with g++-4.3.

Please report on other combinations that work or do not work.

The transition from libreadline5 to libreadline6 may also cause problems; please report details.

Download and Build

Download most recent source packages from

  • frida2.<version>.tgz contains Frida proper,
  • frida2libs-<version>.tgz contains several auxiliary libraries.

Unpack, configure, make, install the libraries:

tar xzvf frida2libs-<version>.tgz
cd frida2libs
sudo make install
sudo ldconfig      # see note below
cd ..

Note regarding ldconfig: This command somehow registers new libraries. I am surprised that it is not automatically executed by make install. But this seems to be distribution specific. Users report:

sudo ldconfig                       # required in Ubuntu
sudo /sbin/ldconfig /usr/local/bin  # required in Suse

Unpack, configure, make, install the main program:

tar xzvf frida2-<version>.tgz
cd frida2
sudo make install
cd ..

Finally, create a directory for the graphics output:

mkdir ~/gnew

That's it. The command frida should start a frida session.


Try to run the following test session:

$ frida
? >  fm                                # enter command fm = file make to create a little data file
Number of points per scan [1] ? 11     # enter 11 to overwrite the default 1
Number of scans [1] ?                  # just press RETURN to accept the default value
Save as [grid3] ?                      # again, we just accept the default value
0 >  oy x^2                            # our data file becomes a parabola
1 >  p                                 # plot it
1 >  cc p0*t^p1                        # create a fit curve: some power law
2 >  cf                                # fit p0,p1 to the data; should say "success"
2 >  a                                 # add the fit to the plot
2 >  quit                              # terminate the frida session

frequent errors

If libraries are not found, check LD_LIBRARY_PATH. Possibly, /usr/local/lib must be added. [related commands: ldd, ldconfig].

If the global configure-make-install fails, goto the subdirectories kww, lmfit, readplus, yaml-cpp-at, and build these libraries separately, using again the standard ./configure; make; sudo make install sequence. Then build frida2. Some of the libraries contain demo directories. In case of problems, go to these subdirectories and try to run the test programs.

If your configure routine fails because of the missing library readline, please check the config.log for further details. If you find the following error messages:

/usr/users/iff_ns/brodeck/usr/local/lib/ undefined reference to `PC'
/usr/users/iff_ns/brodeck/usr/local/lib/ undefined reference to `tgetflag'
/usr/users/iff_ns/brodeck/usr/local/lib/ undefined reference to `tgetent'
/usr/users/iff_ns/brodeck/usr/local/lib/ undefined reference to `UP'
/usr/users/iff_ns/brodeck/usr/local/lib/ undefined reference to `tputs'
/usr/users/iff_ns/brodeck/usr/local/lib/ undefined reference to `tgoto'
/usr/users/iff_ns/brodeck/usr/local/lib/ undefined reference to `tgetnum'
/usr/users/iff_ns/brodeck/usr/local/lib/ undefined reference to `BC'
/usr/users/iff_ns/brodeck/usr/local/lib/ undefined reference to `tgetstr'

you have to use the library ncurses during the compilation. To do so, set the environemnt variable LDFLAGS=“-lncurses” and run configure again (don't forget to run 'export LDFLAGS').


If problems persist, please attach the output of

uname -a

and run

make clean
./configure | tee configure.log
make | tee make.log

and attach configure.log and make.log.