I am trying to compile ffmpeg from sources and create deb package in order to install ffmpeg globally and make it possible to remove it with dpkg -r command.

Here are my commands.

# Installing FFmpeg
cd ~/ffmpeg_sources
wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
tar xjvf ffmpeg-snapshot.tar.bz2
cd ffmpeg
PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
  --prefix="$HOME/ffmpeg_build" \
  --pkg-config-flags="--static" \
  --extra-cflags="-I$HOME/ffmpeg_build/include" \
  --extra-ldflags="-L$HOME/ffmpeg_build/lib" \
  --bindir="$HOME/bin" \
  --enable-gpl \
  --enable-libass \
  --enable-libfdk-aac \
  --enable-libfreetype \
  --enable-libmp3lame \
  --enable-libopus \
  --enable-libtheora \
  --enable-libvorbis \
  --enable-libvpx \
  --enable-libx264 \
  --enable-libx265 \
PATH="$HOME/bin:$PATH" make
sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(date +%Y%m%d%H%M)-git" --backup=no \
  --deldoc=yes --fstrans=no --default
hash -r

Everything compiles successfully, deb packages are created but when I try to use ffmpeg I get

ffmpeg: command not found

So that means that ffmpeg still not installed in $PATH directories.

What is wrong with my commands?


2 Answers 2


The tutorial you mentioned does not use checkinstall because nothing is installed to the system: it "locally installs" the compiled binaries in the ~/bin directory of the user performing the compiling. It does this for a variety of reasons: avoids the complexities of the package management system, avoids messing with system directories, makes updating compiled ffmpeg easier, for shared server users it avoids root/superuser (assuming dependencies are available), and avoids conflicts with the ffmpeg package in the official repository.

Some methods to make your compiled ffmpeg globally executable for all users:

Move it to /usr/local/bin

This is easy:

sudo mv ~/bin/{ffmpeg,ffprobe,ffplay} /usr/local/bin

Downside is that it won't be integrated into the package management system, but that shouldn't be a big deal since undoing this is simple.

To "uninstall":

sudo rm /usr/local/bin/{ffmpeg,ffprobe,ffplay}

Use checkinstall

If you want to use checkinstall to install the compiled ffmpeg binary for integration into the package management system, and so any user can execute it:

cd ~/bin
sudo checkinstall --pkgname=ffmpeg --pkgversion="8:$(date +%Y%m%d%H%M)-git" --default install -Dm755 ffmpeg /usr/local/bin/ffmpeg

This assumes the ffmpeg binary is in ~/bin which it will be if you properly followed the tutorial.

Alternatively, you could remove --prefix="$HOME/ffmpeg_build" and --bindir="$HOME/bin" when configuring ffmpeg, then run PATH="$HOME/bin:$PATH" make, and finally run your checkinstall command from your question if you want to install everything else (libraries, documentation, ffplay, ffprobe) too instead of just the ffmpeg binary.

  • I followed these instructions (help.ubuntu.com/community/CheckInstall) and I am still not 100% clear on how to tell checkinstall which folder to add to the PATH (I compiled BRLCAD 7.28 with ./configure && make && sudo checkinstall and the final bin dir ended up /usr/brlcad/dev-7.28.0/bin/)
    – nmz787
    Nov 9, 2018 at 3:32
  • @nmz787 I recommend asking that as a new question.
    – llogan
    Nov 9, 2018 at 5:53
  • it seems no different than the OP's "So that means that ffmpeg still not installed in $PATH directories." which is true
    – nmz787
    Nov 9, 2018 at 21:02
  • @nmz787 The OP followed a guide that "installs" the FFmpeg executable files to ~/bin on purpose for reasons already mentioned above. All that the checkinstall command does in the answer is install it to /usr/local/bin for the sole purposes to 1) integrate it into the package management system, and 2) to make ffmpeg accessible to all users as requested by the OP. This is a roundabout way of doing things because they could have just compiled without the custom --prefix and --extra-* options then run checkinstall normally.
    – llogan
    Nov 9, 2018 at 21:33
  • @nmz787 Trying to use checkinstall to fix BRLCAD's oddball prefix seems like an XY Problem. I know nothing of BRLCAD or why it is installing to /usr/brlcad/dev-7.28.0/bin/, but using checkinstall to change this is not the right tool for the job, as it should be done via the configure/cmake step. That's why I suggested you ask a new question.
    – llogan
    Nov 9, 2018 at 21:36

It worked for me, i was creating deb package for git 2.18


cd git_2.18.1 (tar extracted folder) ./configure --bindir=/usr/local/bin && make sudo checkinstall

The package git_2.18.1-1_amd64.deb was created whos install path is /usr/local/bin

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .