My attempts to compile to get Gerbera, a popular DLNA server running proved futile. The dependencies seem to be alright. The documentation doesn't mention any make flags needed. So when I try to make, building reaches 100% and then fails on

[100%] Linking CXX executable gerbera
with the following message:
/usr/bin/ld: liblibgerbera.a(sqlite_database.cc.o): undefined reference to symbol 'sqlite3_mprintf'
/usr/bin/ld: /lib/x86_64-linux-gnu/libsqlite3.so.0: error adding symbols: DSO missing from command line
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [CMakeFiles/gerbera.dir/build.make:98: gerbera] Error 1
make[1]: *** [CMakeFiles/Makefile2:78: CMakeFiles/gerbera.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
I am unfamiliar with this kind of issue, so would be grateful if someone explained it to me or, if possible, helped me to fix it

  • DSO missing from command line usually means there should have been a directive like -lsqlite3 in the link command. Did you install all the recommended prerequisites including libsqlite3-dev? Oct 29, 2020 at 14:26
  • Yes, the documentation has the list of all recommended prerequisites. I have no issues with that.
    – ValeraB
    Oct 29, 2020 at 17:31
  • Where is this link command stored?
    – ValeraB
    Oct 30, 2020 at 0:00
  • It should be part of the Makefile (or a subsidiary Makefile) that is generated by the cmake command Oct 30, 2020 at 0:07
  • What operating system and version are you using?
    – gsxruk
    Oct 31, 2020 at 11:30

1 Answer 1


I tried building from the standard instructions and also found problems. However I did manage to build it in the end as follows:

Install Dependencies

sudo apt install uuid-dev libsqlite3-dev libmysqlclient-dev libmagic-dev libexif-dev libcurl4-openssl-dev libspdlog-dev libpugixml-dev libavutil-dev libavcodec-dev libavformat-dev libavdevice-dev libavfilter-dev libavresample-dev libswscale-dev libswresample-dev libpostproc-dev duktape-dev libmatroska-dev libsystemd-dev libtag1-dev libfmt-dev ffmpeg git cmake autoconf libtool

Build/Install spdlog

During my first "configure" I received a message stating that there would be a conflict with the Ubuntu provided spdlog. Here we build and install our own with the correct flags set.

git clone https://github.com/gabime/spdlog
cd spdlog
sudo make install

Download gerbera

git clone https://github.com/gerbera/gerbera.git

Build/Install libupnp

The library provided by Ubuntu is too old so we need to build and install a newer version. The gerbera source provides a script to do this for us.

cd gerbera/scripts/
chmod +x install-pupnp.sh
sudo ./install-pupnp.sh

Build/Install gerbera

From the folder holding the gerbera root folder you downloaded:

mkdir build
cd build
sudo make install

The above all worked when I tried it on a fresh install of Ubuntu 20.04.


If you'd rather not build gerbera yourself, there is a Ubuntu PPA available. Therefore, you could install gerbera easily as follows:

sudo add-apt-repository ppa:stephenczetty/gerbera-updates
sudo apt-get update
sudo apt install gerbera
  • It worked! Thank you for your help. However, I can not find the gerbera.service file on /etc/systemd/system/ Is it critical if I want to run as a daemon? What do I do in this case?
    – ValeraB
    Nov 9, 2020 at 22:34
  • Sorry. I don't know anything about Gerbera, what it does or how it works. That's an entirely different question.
    – gsxruk
    Nov 10, 2020 at 20:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.