Ubuntu – Installing libliquid-dev on a distro that doesnt support it with a repo

apt

I want to compile and install a software called Inspectrum for which I have to fulfill a dependency "libliquid-dev" apart from other 5 dependencies listed below;

  1. qt5-default
  2. libfftw3-dev
  3. cmake
  4. pkg-config.

However, libliquid-dev was not found to be installed by apt-get even after a fresh install of Ubuntu 16.04 followed up by an apt-get update and an apt-get upgrade. All other dependencies were successfully found and installed via default repositories.

Hence, I started to dig deep. This is Ubuntu 16.04. I.e. Xenial. But, I noticed from the Ubuntu package search that libliquid-dev is not available in Xenial repos. Proof:

https://packages.ubuntu.com/search?suite=xenial&keywords=libliquid-dev

However, I noticed that libliquid-dev is availalbe in Artful.
So I went ahead and edited my /etc/apt/sources.list and added the line
"deb http://cz.archive.ubuntu.com/ubuntu artful main universe"
This found & installed the libliquid-dev library and therefore I installed Inspectrum successfully. But in the next boot, my system completely broke down. This drives me to ask the following question.

How can I make my Ubuntu 16.04 system be able to install the library libliquid-dev without breaking its functionality?

I know so that my approach described in this question is not correct. I am searching for the most approphriate way of installing libliquid-dev in linux so that I can happily install Inspectrum while keeping operating system intact.

Best Answer

I tested this method on my Xenial system. It does not break system, but installs 4 files out of APT control. But this method works.

  1. Install build-dependencies as written in inspectrum wiki

    sudo apt-get update
    sudo apt-get install qt5-default libfftw3-dev cmake pkg-config
    
  2. Install libliquid1d and libliquid1d-dev from Artful manually by extracting them directly:

    cd ~/Downloads
    wget http://mirrors.kernel.org/ubuntu/pool/universe/l/liquid-dsp/libliquid1d_1.3.0-1_amd64.deb
    dpkg -x libliquid1d_1.3.0-1_amd64.deb .
    
    wget http://mirrors.kernel.org/ubuntu/pool/universe/l/liquid-dsp/libliquid-dev_1.3.0-1_amd64.deb
    dpkg -x libliquid-dev_1.3.0-1_amd64.deb .
    
    sudo cp  usr/lib/x86_64-linux-gnu/libliquid.* /usr/lib/x86_64-linux-gnu/
    sudo cp -ar usr/include/liquid /usr/include/
    
  3. Install necessary tools for compilation

    sudo apt-get install build-essential git
    
  4. Clone repository and compile the program

    cd ~/Downloads
    git clone https://github.com/miek/inspectrum.git
    cd inspectrum
    mkdir build
    cd build
    cmake ..
    make
    sudo make install 
    

    Note: Last step (sudo make install) is normal for this small project, otherwise use checkinstall.

  5. Run installed program by inspectrum command.

Related Question