Get the tool source code and build command in the repository in Ubuntu

Source: Internet
Author: User
In Ubuntu, how does one obtain the source code in the ubuntu source code package from the tool source code and build commands in the repository? 1. before obtaining the source code package, make sure that the deb-src item is added to the etcaptsourceslist of the software source configuration file. 2. run the following command to obtain the detailed information of the xxx source code package: sudoap Ubuntu obtains the tool source code and build commands in the repository. how do I obtain the source code in the ubuntu source code package? 1. before obtaining the source code package, make sure that the configuration file/etc/apt/sources is in the software source. deb-src is added to list. 2. use the following command to obtain the detailed information of the xxx source code package: sudo apt-cache showsrc xxx, which is used to query whether the source code package exists in the current image site. The 3rd source code package usually contains 3 files, with the suffix of dsc,orig.tar.gzand diff.gz respectively. Sudo apt-get source xxx command to obtain the source code package. it downloads the source code package to the user's current directory and calls the dpkg-source command during command execution, based on the information in the dsc file, extract the source code package to the Directory of the same name, where the source code of the application is located. Sudo apt-get source xxx must ensure that dpkg-dev is installed before downloading the source code package (run "apt-get install dpkg-dev ), otherwise, only three files in the source code package will be downloaded, but the source code package will not be decompressed. Of course, you can use the dpkg-source command to decompress the source code package. 4. install dependency-related software packages before compiling the source code package. Use the "apt-get build-dep" command to obtain and install all related software packages. Sudo apt-get build-dep xxx 5. now you can compile the source code package. First, go to the directory where the source code is located and use the dpkg-buildpackage command to compile the source code package, it places the generated Deb software package in the upper directory. Cd xxxsudo dpkg-buildpackage will compile and generate xxx_i386.deb 6 and install the software package. Run the "dpkg-I" command to install the generated Deb software package. Sudo dpkg-I xxx_i386.deb
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.