Linux is curl installed

How to Install Curl in Linux

In this article, you will learn how to install the curl command-line tool for transferring data to and from a server using various types of requests. It’s an alternative to downloading files other than using wget command.

The curl command downloads files that are served with FTP, HTTP, SCP, IMAP, and other various supported protocols. It’s an amalgamation of the words World Wide Web and it is used in Unix/Linux systems to download files and packages on the Linux terminal.

On this page

Install curl on Ubuntu/Debian

In modern systems, curl comes pre-installed. However, If you are running an instance of Ubuntu or Debian, issue the command.

Install Curl in Debian and Ubuntu

To verify the curl installation, run.

Confirm Curl Installation on Debian and Ubuntu

Install curl on RHEL / CentOS / Fedora

To install curl on RHEL, CentOS and Fedora distros, log in via SSH as root and run the command.

Install Curl in CentOS

To confirm the installation of curl, run.

Confirm Curl Installation on CentOS

Install curl on OpenSUSE

On OpenSUSE, install curl by running.

Install Curl in OpenSuse

To confirm the installation of curl run.

Confirm Curl Installation on OpenSUSE

Install curl on ArchLinux

To install Curl on ArchLinux, run.

Install Curl on Arch Linux

And finally, to confirm its installation run the command.

Confirm Curl Installation on Arch Linux

To know more about curl command usage and examples, I suggest you read our following article that explains how you can use curl command-line utility for downloading files from the web.

And with that, we have come to the end of this guide. In this tutorial, you learned how to install curl in different Linux distributions.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

Читайте также:  Папка с иконками mac os

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

We are thankful for your never ending support.

Источник

How to install curl on Debian Linux 10/9/8

Installing Curl on Debian

  1. Open the terminal application
  2. Update system, run: sudo apt update && sudo apt upgrade
  3. Install curl on Debian, execute: sudo apt install curl
  4. Test curl

Let us see how to install and use curl on Debian.

How to install curl on Debian Linux 10/9/8

Type the following command to install curl on Debian Linux:
$ sudo apt install curl
OR
$ sudo apt-get install curl
Sample outputs:

Displaying curl version

For verification purpose type:
curl —version
You will see:

It seems I am using curl version 7.68.0.

  • No ads and tracking
  • In-depth guides for developers and sysadmins at Opensourceflare✨
  • Join my Patreon to support independent content creators and start reading latest guides:
    • How to set up Redis sentinel cluster on Ubuntu or Debian Linux
    • How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
    • How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
    • A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
    • How to protect Linux against rogue USB devices using USBGuard

Join Patreon

Usage

Once installed the curl, you can use it as follows to see the headers for given domain:
$ curl -I https://www.google.co.in/
$ curl -I https://www.cyberciti.biz/
Headers for my blog:

We can download a file from a server using curl itself:
curl -o output.file http://server1.cyberciti.biz/foo.bar.txt
You can resume broken download with the curl command as follows:
curl -L -O -C — http://ftp.ussg.iu.edu/linux/centos/latest/isos/file.iso

Getting more help on curl

Type the following man command:
man curl
OR
curl —help

Conclusion

🐧 Get the latest tutorials on Linux, Open Source & DevOps via

Источник

Установка curl в Ubuntu

Если установочный скрипт выдаёт ошибку: bash: curl: command not found или bash: curl: команда не найдена. Это значит что такой команды нет в вашей системе. Решение простое – установить утилиту curl. Эта утилита для скачивания файлов хоть и не так популярна, как wget, но может предоставить больше возможностей, а также имеет в своём составе библиотеку, которую можно подключить к другим программам.

Мы рассмотрим как установить curl в Ubuntu 20.04. Но инструкция будет актуальна и для более новых или старых версий дистрибутива.

Читайте также:  Команды справочной системы ос windows

Установка curl в Ubuntu

Представим вполне реальную ситуацию. Вы решили установить приложение с помощью скрипта .sh. Для скачивания скрипта предлагают использовать команду curl, она также может оказаться и в самом скрипте. Однако по умолчанию эта утилита не установлена в Ubuntu 20.04, поэтому при попытке запуска скрипта вы увидите ошибку curl: команда не найдена. А если вы попробуете запустить непосредственно саму утилиту, то сообщение будет выглядеть следующим образом: bash: /usr/bin/curl: Нет такого файла или каталога. Для установки curl следует использовать такие команды:

sudo apt update

sudo apt install curl

После установки скрипт, содержащий команду curl, должен заработать. Для того чтобы узнать версию утилиты выполните:

Эта команда может быть важна, так как программа активно развивается и каждый раз исправляются десятки ошибок и добавляются новые функции. Для того чтобы скачать файл используйте такую команду:

curl -OC — https://releases.ubuntu.com/20.04.2.0/ubuntu-20.04.2.0-desktop-amd64.iso

О других аргументах и способах их использования можете узнать в нашем материале.

Выводы

Утилита curl получила широкое распространение. Она доступна на всех актуальных настольных операционных системах. В Ubuntu 20.04 утилита не предустановлена, но доступна в репозитории и теперь вы знаете как выполняется установка curl Ubuntu.

Описанная ошибка чаще всего встречается только на недавно установленном дистрибутиве. Так как библиотека libcurl используется большим количеством приложений и рано или поздно будет установлена в вашей системе вместе с curl.

Источник

Compiling php with curl, where is curl installed?

I need to specify a directory when compiling php with —with-curl=

The curl binary is located at /usr/bin/curl

curl -V gives me

locate curl gives me

removed /usr/share/. and other irrelevant files

UPDATE

Tried —with-curl=/usr/lib64 and —with-curl=/usr/lib although I’m pretty sure it’s 64 bit.

SOLUTION

PHP requires curl-devel

5 Answers 5

None of these will allow you to compile PHP with cURL enabled.

In order to compile with cURL, you need libcurl header files (.h files). They are usually found in /usr/include/curl . They generally are bundled in a separate development package.

Per example, to install libcurl in Ubuntu:

Then you can just do:

If you compile cURL manually, you can specify the path to the files without the lib or include suffix. (e.g.: /usr/local if cURL headers are in /usr/local/include/curl ).

Adding to @netcoder answer above, If you are using Ubuntu 17+, installing libcurl header files is half of the solution. The installation path in ubuntu 17.0+ is different than the installation path in older Ubuntu version. After installing libcurl, you will still get the «cURL not found» error. You need to perform one extra step (as suggested by @minhajul in the OP comment section).

Читайте также:  У меня долго скачивается windows 10

Add a symlink in /usr/include of the cURL installation folder (cURL installation path in Ubuntu 17.0.4 is /usr/include/x86_64-linux-gnu/curl).

My server was running Ubuntu 17.0.4, the commands to enable cURL support were

Then create a link to cURL installation

Try just —with-curl, without specifying a location, and see if it’ll find it by itself.

If you’re going to compile a 64bit version(x86_64) of php use: /usr/lib64/

For architectures (i386 . i686) use /usr/lib/

I recommend compiling php to the same architecture as apache. As you’re using a 64bit linux i asume your apache is also compiled for x86_64.

Источник

How to Install curl and php-curl on Linux

Curl is a free and open source data transfer tool used for transfer of data to and from a server using the following supported protocols: IMAP, IMAPS, POP, POP3, POP3S, DICT, FILE HTTP, HTTPS, SMB, SMBS, SMTP, SMTPS, FTP, FTPS, TELNET, RTSP, RMTP and TFTP.

During its normal operation, it displays a meter-like progress bar indicating parameters such as data transfer speed, amount of data transferred, and estimated time left. The speed is indicated in bytes per second.

This tutorial explains how we can install curl and php-curl in various Linux distributions.

Ubuntu 18.04, 17.10 and Debian 9.3

Login as root and update your Ubuntu system first

Verify curl is installed and check its version

From source

Visit curl’s website and download the latest curl version by copying the link and using wget command

Uncompress the tarball file using the tar command below

Navigate to the uncompressed folder

You’ll require the C compiler to build the source code. Install the C compiler as shown below.

Run the commands below in succession to compile the source code

Centos 7

Login as root and run

From source

Just like we did in Ubuntu 17.10, navigate to curl’s website and download the curl tarball.

Uncompress the tarball

Navigate to the uncompressed folder

Centos 7 comes already installed with a C compiler. Run the commands below to compile the source code

Verify installation of curl

Fedora 27

NOTE Fedora 27 comes pre-installed with curl.

To install php-curl simply log in as root and run

Verify installation of curl

Arch 2017 Linux

First, log in as root and update the system

Verify whether curl in installed

Alpine Linux 3.7

Run apk add curl

Verify installation of Curl

Curl is the backbone of internet data transfer for thousands of software applications using a myriad of protocols. Being free and open source has enabled many contributors to work on the curl project and continually come up with newer and improved versions.

Источник

Оцените статью