Addition of Deb package local source in Ubuntu system

Source: Internet
Author: User
Keywords Local source Deb package dpkg nbsp installation
Tags aliyun apt archive content create deb package debian directory

Deb is the http://www.aliyun.com/zixun/aggregation/33836.html ">debian package format file name extension, like Debian, Deb is named after Debra Murdock, She is the wife of the Debian founder Ian Murdock. The Debian package is a standard archive of Unixar, packaged with package file information and package content, via gzip and tar. The classic procedure for handling these packages is dpkg, which is often operated through Debian Apt.

With the Alien tool, you can convert the Deb package to RPM, tar.gz format. The Deb package is similar to a software package (EXE) in Windows in the Linux operating system and requires little or no complex compilation to be installed with the mouse click.

There are usually a few you want to be in the source of Ubuntu. If those bags still have a lot of dependencies, try using dpkg.

Create a personal local source

There are 4 steps to creating a simple source yourself

1, Install Dpkg-dev
2. Create the report catalogue
3. Create a script scan package and create a apt update readable file
4. Add a line to your source in the Sources.list
= = = Install Dpkg-dev = = = (generally installed)

Run under terminal

sudo apt install Dpkg-dev

Directory

Create a directory where you need to save the package. For example, I (the original author) will use/usr/local/mydebs. (I suggest using the directory under ~/to prevent permission issues)

Mkdir/usr/local/mydebs

Now, move your package to the directory you created previously. All downloaded packages are hosted in the/var/cache/apt/archives directory. If you install Apt-cacher, there are additional packages that reside in his/packages directory.

Script to upgrade your own software library

This is a simple three liners (it ' s a simplicity three liners:)

#! /bin/bash
Cd/usr/local/mydebs #用你之前方包的目录
Dpkg-scanpackages. dev | gzip-9c > packages.gz

Copy to Gedit, save as Update-mydebs in ~/bin. (' ~ ' refers to your catalogue.) If ~/bin does not exist, create it: Ubuntu will put this directory in path. This is a good place to store personal scripts. Next, give the file permission to run:

chmod u+x ~/bin/update-mydebs

Add Local source

Add in/etc/apt/sources.list:

Deb File:/usr/local/mydebs.

Use local source

When you put the new Deb package into the Mydebs directory, run

sudo update-mydebs
sudo apt update

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.