top of page
Writer's pictureSiddhesh Kadam

Building Package (cURL) from Source on Linux


Building and Installing Package

Building package from a source can provide you with the latest features and customisation options. In this blog post, I'll guide you through the process of building and installing cURL, a popular command-line tool for transferring data, from its source code on a Linux system.


Commands used in the process of building and installing software from source on a Linux.



Step 1: Download cURL Source Code

Open your terminal and use the wget command to download the cURL source code from its official website. The following command fetches version 7.32.0 of cURL:

[root@siddhesh ~]# wget -O curl.tar.gz http://curl.haxx.se/download/curl-7.32.0.tar.gz

Step 2: Extract the Tarball


Once the download is complete, extract the contents of the tarball using the tar command:

[root@siddhesh ~]# tar -xvzf curl.tar.gz

Step 3: Navigate to cURL Directory


Change into the newly created cURL directory:

[root@siddhesh ~]# cd curl-7.32.0/

Step 4: Run the Configure Script


Use the ./configure script to configure cURL for your system. This script checks for dependencies and sets up the build environment:

[root@siddhesh curl-7.32.0]# ./configure

To disable a specific feature, use an additional flag. For example, to disable IPv6 support in Curl, use the following command.

[root@siddhesh curl-7.32.0]# ./configure --disable-ipv6

Step 5: Build the Software


Execute the make command to build the cURL software:

[root@siddhesh curl-7.32.0]# make

Step 6: Install cURL


Finally, use the make install command to install cURL on your system:

[root@siddhesh curl-7.32.0]# make install

Step 7: Uninstall cURL


Use the make uninstall command to uninstall cURL:

[root@siddhesh curl-7.32.0]# make uninstall

This command will remove the files and directories that were installed with make install.

If make uninstall is not available or doesn't work, you may need to manually remove the installed files. You can check the Makefile generated during the ./configure step to see what files were installed and where. This can involve deleting files and directories created during the installation process.

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page