Skip to content

5000+ Great Articles

Best Articles & Essays: Interesting Articles to Read Online

  • The Best Free Apps for a New iPhone Smartphones
  • APFS vs Mac OS Extended – Which Mac Disk Format Is Best? OS X
  • Show/Hide Field Codes in Word and Convert Fields to Text Office Tips
  • 7 Ways to Save an Image From Google Docs Computer Tips
  • 8 Things To Try If Your Headphones Are Not Working In Windows Help Desk
  • 12 Best Chrome Flags to Enable for Better Browsing Google Software/Tips
  • How to Add a Local DNS Lookup to Hosts File Networking
  • 3 Best MicroSD Cards To Buy in 2020 Gadgets

How To Compile Software Packages On Linux

Posted on October 7, 2020 By blog_786 No Comments on How To Compile Software Packages On Linux

One of the hardest adjustments for users moving from Windows to Linux is the idea that not all of the programs you want to install are ready for you. Unlike Windows users who (in most cases) receive the software as an EXE or ZIP installer, Linux users often have to compile their own software packages.

If you want to learn how to compile software packages on Linux, there are a few steps to follow. You will need to download the source, run the configure command, install any required dependency packages, and then run the make command to start compiling your package. Here’s how to do it on a Linux-based operating system.

How To Compile Software Packages On Linux

Download source files

Before you start building your new software packages, you need the source code. It could be a package that you developed yourself, in which case you should already have access to the source code.

However, it is more likely that you are trying to compile a Linux software package from another developer. Popular code sharing sites like Github allow you to view and download the source code of packages, which you can then compile. You can use GIT, a popular version control system, to download the source files to your computer.

How To Compile Software Packages On Linux

You can also directly download the source code from open source projects like VLC. They are usually in a compressed file format such as TAR.GZ, which can be extracted from a terminal using the tar command. For example, running the command tar -xzvf source.tar.gz will extract an archive file named source.tar.gz.

Once the source code is available and unpacked on your Linux PC, you can move on to the next preparation step before you start compiling your package.

– /

Install Build-Essential on Linux

The tools and software contained in the build-essential package are essential for any type of software compiled on Linux operating systems, regardless of the programming language of your source code.

As a required package, build packages (or packages with similar names) should be available in the software repository of your Linux distribution. The Arch Linux-based equivalent of build-essential is called base-devel, which includes many of the same tools.

The installation instructions for build-essential will also differ depending on your Linux distribution. For example, on Ubuntu and Debian based operating systems, you can install build-essential by opening a terminal window and typing sudo apt install build-essential.

How To Compile Software Packages On Linux

Installing build-essential will also install its dependencies, such as the g ++ package. Once this process is complete, you can move on to customizing your Linux source package before compiling it.

Run config command

The source code for core packages usually contains a configuration script. Running this script will check your Linux distribution for the necessary packages that your source code needs to compile correctly.

To run the configuration script, enter the location of the extracted source code using the cd command. From there, type ./configure into a terminal and press Enter to launch it.

How To Compile Software Packages On Linux

If the configuration script finds a missing package, it will tell you what to do at the end of the script. For example, before compiling the VLC media player, the configuration script shown above found that the Lua programming language was not installed.

In some cases, you can still compile and customize software packages even if the customization script finds a missing package or feature. The VLC configure script (shown above) provides a solution for the missing Lua programming language packages by suggesting that you run it again with the –disable-lua flag to bypass it.

You will need to install any missing packages found by the config script, or use any suggested disable flags to work around these errors before you can proceed.

If the configuration script completed without errors (or without errors), a customized makefile for your package will be generated. This creates instructions for compiling your package, allowing you to proceed to the final stage of compiling your software.

Install missing dependency packages

The configure script helps you identify any packages that your Linux distribution needs to properly compile and install a new software package.

They can be clearly identified by your customization script error message or during the execution of that script. If the error message does not clear up, scroll back in your terminal history to try to identify the missing package.

Once you know which package is missing, use the package installer for your Linux distribution to install it. For example, on Ubuntu and Debian based operating systems, running sudo apt install package-name will install the package.

How To Compile Software Packages On Linux

Installing any missing dependencies is the last step you need to complete before you can start compiling and installing a new software package. Once this process is complete, compilation can begin.

How to Compile on Linux

The build-essential package contains make, an automatic tool used to start compiling source code into software that you can run on your PC. It uses a makefile configured and generated by the previous configure command, which contains the specific instructions needed to compile your package.

How To Compile Software Packages On Linux

To start compiling the source code, open a terminal and use the cd command to enter the correct folder. When ready, enter make to start compiling the package.

How To Compile Software Packages On Linux

It will take a little time, depending on the package size and available system resources. If there are no errors after compiling the software package, you can install it.

To do this, enter sudo make install in a terminal. The package will be installed on your Linux computer, and you can open and use it like any other software.

How To Compile Software Packages On Linux

Install new software on Linux

Knowing how to compile software packages on Linux can help you install lesser known software. Major operating systems like Ubuntu and Devian have large software repositories available to users, so if you don’t want to compile your software, try finding and installing new software using the package manager.

If you’re migrating from Windows, you can also install Windows software on Linux to continue using your favorite Windows-only apps.

–

Share this:

  • Twitter
  • Facebook
Linux Tips

Post navigation

Previous Post: How Secure Is the Military-Grade AES Encryption Algorithm?
Next Post: A Brave Browser Review: Is It the Next Great Browser?

Related Posts

  • Forcefully Close a Program in Ubuntu Linux Tips
  • Ten most useful Raspberry Pi commands Linux Tips
  • How to Create a Linux Disk Partition Linux Tips
  • How To Reinstall Linux Mint Without Losing Your Data & Settings Linux Tips
  • How to Uninstall Ubuntu in a Windows 10 Dual-Boot System Linux Tips
  • Best Linux Tablets 2021 Linux Tips

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Archives

  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • March 2021
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • December 2019
  • July 2019
  • May 2019
  • April 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018

Categories

  • AI Tools & Guides
  • Amazon Web Services
  • Apple Watch
  • Computer Tips
  • Cool Websites
  • Featured Posts
  • Free Software Downloads
  • Gadgets
  • Gaming
  • General Software
  • Google Software/Tips
  • Hardware
  • Help Desk
  • How-To
  • iOS
  • iPad
  • iPhone
  • islamic Books
  • Linux
  • Linux Tips
  • Mac OS X
  • macOS
  • MS Office Tips
  • Networking
  • Office Tips
  • OS X
  • Product Reviews
  • Reviews
  • Safari
  • Smart Home
  • Smartphones
  • Software Reviews
  • technology
  • text
  • Tools Review
  • Troubleshooting
  • Tutorials
  • Uncategorized
  • Urdu Books PDF
  • Web Site Tips
  • Windows
  • Windows 10
  • Windows 7
  • Windows XP Tips
  • Wordpress
  • Flixable Helps You Find the Best Movies and TV shows on Netflix
  • How to Watch Winter Olympics 2018 from Anywhere
  • Why does Instagram say this story is unavailable?
  • How to turn off Do Not Disturb mode on Android
  • 3 Sites like YouTube to Earn Money With Your Videos
DMCA.com Protection Status

Recent Posts

  • 15 Best Legal Torrenting Sites to Download Content Safely
  • Review of the ReMarkable 2.0 tablet with Type Folio keyboard
  • Flixable Helps You Find the Best Movies and TV shows on Netflix
  • How to Watch Winter Olympics 2018 from Anywhere
  • 5 Sites That Are Like Audible, But Free

Recent Comments

  1. Flixable Helps You Find the Best Movies and TV shows on Netflix on SmartDNS vs VPN “What’s the Difference?”
  2. 5 Sites That Are Like Audible, But Free on Top 4 Amazon Price Tracker Tools
  3. 5 Sites That Are Like Audible, But Free on 14 Best Free Audiobooks on Audible – 2022
  4. How to Reduce PNG File Size of a Photo on How to Convert a Screenshot to a Jpeg on a Mac
  5. 3 Sites like YouTube to Earn Money With Your Videos on Here are the Top 10 highest paid YouTubers of 2013
  • 6 Best Reading Apps For Kids

    If your child is struggling to acquire skills or maintain an interest in reading, there are many great reading apps for kids that can help them lear

  • How to Live Stream With 2+ People on YouTube for Free (It’s Easy) How-To
  • Lightroom vs Photoshop: Which One Should You Use Software Reviews
  • What Is Google Exposure Notifications for COVID Protection? Google Software/Tips
  • Best Ways to Fix Mail Application Keeps Crashing on Mac macOS
  • 5 Ways iPhone/Android Can Cast Screen to TV Without Chromecast How-To
  • How to Set Up a Windows XP Virtual Machine for Free Virtualization
  • How To Add Music To Google Slides How-To

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Go to mobile version