How to repackage Deb files under Debian and Ubuntu

This article will tell Ubuntu, Linux Mint and Debian GUN/Linux users how to easily decompress and repackage .deb files on their Debian-based Linux operating system.

Sometimes you will encounter such a problem in your life, you want to modify part of the .deb file and then repackage it. The following example is a real experience that just happened to me. A Linux developer built a Debian package (.deb) for a piece of software, and I successfully installed it on my Ubuntu computer.

When I try to retrieve some files from a Git repository, it always freezes. Obviously, the software is not working properly. I know where the installed files are (/opt directory), so I searched the code and fixed some of the problems appropriately. After that, when the program tries to retrieve the required package, it no longer freezes.

So to make a long story short, I will unpack the .deb file, replace it with my patch file, and then repackage it back. In this way, I can install it on other computers, or send the revised package file to my friends. What should I do?

Searching for the answer to the question on the Internet, I found a small blog named ailo.net, which gave an explanation like this:

( adsbygoogle = window.adsbygoogle || []).push({});

mkdir -p extract/DEBIAN
dpkg-deb -x package.deb extract/
dpkg-deb -e package.deb extract/DEBIAN [...do something, e.g. edit the control file...]
mkdir build
dpkg-deb -b extract/ build/

These five commands will do the job miraculously. Let me explain it for you:

This is this tutorial! Remember the above command firmly, after you execute the third command, you can use your default file manager to visually modify the file with a graphical text editor. If you encounter problems while studying this tutorial, don't hesitate to leave us a comment below.

Recommended Posts

How to repackage Deb files under Debian and Ubuntu
How to compile ijkplayer-android under ubuntu
How to install Audacious under Ubuntu
How to install Tensorflow under ubuntu 16.04
How to realize file sharing between Ubuntu and Windows under VMware
How to change MySQL password under Ubuntu
How to install Ubuntu20.04 and install NVIDIA driver
How to install vim editor under Linux (Ubuntu 18.04)
How to install Pycharm and Ipython on Ubuntu 16.04/18.04
How to install and configure Gogs on Ubuntu 18.04
How to modify time zone and time in ubuntu
How to install and configure Cyberpanel on Ubuntu 18.04
How to install and secure phpMyAdmin on Ubuntu 16.04
How to install and configure ownCloud on Ubuntu 16.04
How to install and configure ownCloud on Ubuntu 16.04
How to install and configure GitLab on Ubuntu 18.04
How to install and use Docker on Ubuntu 20.04
How to install and configure Ansible on Ubuntu 18.04
The solution to the failure to install .deb under Ubuntu 16.04
How to install and use Curl on Ubuntu 18.04
How to install and use Composer on Ubuntu 18.04
How to install and use Wine on Ubuntu 18.04
How to install and secure phpMyAdmin on Ubuntu 16.04
How to install and configure Elasticsearch on Ubuntu 16.04
How to install and configure PostGIS on Ubuntu 14.04
How to install and use Composer on Ubuntu 20.04
How to install and use BaasBox on Ubuntu 14.04
How to install and configure VNC on Ubuntu 18.04
How to install and configure Sphinx on Ubuntu 16.04
How to install and configure OrientDB on Ubuntu 14.04
How to install and use PostgreSQL on Ubuntu 16.04
How to delete files and directories in python
How to read and write files with Python
How to install and configure AppScale on Ubuntu 12.04
How to enable Mysql remote access under Ubuntu 14.04
How to install gcc compiler faster under Ubuntu
How to install and use Docker on Ubuntu 16.04
How to install and configure PostGIS on Ubuntu 14.04
How to upgrade to Ubuntu 20.04
[python] python2 and python3 under ubuntu
How to upgrade to Ubuntu 20.04
How to backup and restore Redis data on Ubuntu 14.04
How to create and use MongoDB backups on Ubuntu 14.04
How to install and use MySQL Workbench on Ubuntu 18.04
How to modify time zone and time in ubuntu system
How to install two versions of OpenCV under ubuntu?
How to install theano and keras on ubuntu system
How to open https on nginx server under Ubuntu
How to upgrade to Ubuntu 16.04 LTS
How to create LVM for XFS file system under Ubuntu
How to set up Java Home on Ubuntu and Raspbian
How to install memcache and start it in ubuntu environment
How to compile and install PHP and Nginx in Ubuntu environment
How to install JDK and Mysql on Ubuntu 18.04 linux system
How to map shared disk to window in linux under Ubuntu
How to install Helm in Ubuntu
How to install Ruby on Ubuntu 20.04
How to install Memcached on Ubuntu 20.04
How to install MySQL on Ubuntu 20.04
How to use hanlp in ubuntu
How to install VirtualBox on Ubuntu 20.04