Ubuntu 18.04下从源码构建gstreamer1.5后为何未在apt列表显示?
Hey there! Let's work through this problem step by step. The core issue here is that make install just drops files directly onto your system without registering them with APT—this is why you don't see the package in apt list and Kurento can't properly recognize your modified GStreamer build. To get it working like an official package, you need to build a custom Debian package from your modified source. Here's how to do it on Ubuntu 18.04:
First, make sure you have all the tools needed to build Debian packages:
sudo apt-get install build-essential devscripts debhelper dh-autoreconf autotools-dev
Assuming you've already cloned and modified the GStreamer 1.5 repo:
- Navigate to your source directory:
cd /path/to/your/gstreamer-1.5 - Grab the official Debian packaging files (if your repo doesn't already include them). For reference, you can pull the base packaging config for GStreamer using:
Then copy theapt-get source gstreamer1.0debiandirectory from the pulled source into your modified GStreamer repo—this gives you the structure needed to build a valid Deb package.
This is the key part to strip out unnecessary plugins:
- Edit
debian/rules:
Find the section wheredh_auto_configureruns, and add--disable-[plugin-name]flags for each plugin you want to remove. For example:dh_auto_configure -- \ --disable-unwanted-plugin1 \ --disable-unwanted-plugin2 \ # Keep other existing configure flags - Edit
debian/control:
If the removed plugins had their own sub-packages (likegstreamer1.5-plugins-bad), delete those package entries from this file. Also, adjust dependency lines to reflect any removed dependencies.
- Create a changelog entry (required for Debian packaging):
Fill in a version number (e.g.,dch --create1.5.0-1ubuntu1~custom1), add a description of your modifications (e.g., "Removed unused plugins for Kurento compatibility"), then save and exit. - Start the build:
This will generate alldpkg-buildpackage -us -uc.debfiles in the parent directory of your source repo. If you hit dependency errors, install the missing build dependencies with:
(Note: Adjust the package name if needed for GStreamer 1.5 specifically.)sudo apt-get build-dep gstreamer1.0
- Move up to the parent directory and install all generated
.debfiles:cd .. sudo dpkg -i *.deb - If you run into dependency issues, fix them with:
sudo apt-get -f install
Now you can verify the package is registered with APT:
apt list --installed | grep gstreamer
Your modified files will also be in the correct system paths (like /usr/lib/x86_64-linux-gnu/gstreamer-1.5/).
When installing Kurento Media Server, it will recognize your custom GStreamer package because it's now registered in the APT system. If Kurento has strict version dependencies, double-check that the version number you set in the changelog meets its requirements.
Quick Notes
- Never build packages as root—use a regular user account, only use
sudofor installation. - Ubuntu 18.04 ships with GStreamer 1.14 by default, so you might hit minor dependency conflicts with 1.5. Adjust build flags or install required older libraries if needed.
内容的提问来源于stack exchange,提问作者Alex Blanz

