apt get install php curl

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

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

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

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

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

sudo apt install curl

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

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

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

Выводы

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

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

Источник

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

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.

Источник

How do I install the ext-curl extension with PHP 7?

With PHP 5, you can easily install it by running the yum or apt-get install php5-curl command, but I can’t find how to install the PHP 7 equivalent.

How do I install ext-curl for PHP 7?

12 Answers 12

Well I was able to install it by :

on my system. This will install a dependency package, which depends on the default php version.

After that restart apache

If «sudo apt-get install php-curl» command doesnt work and display error We should run this code before install curl.

I tried the above solutions but it didn’t work for me, just incase there any other person in the same shoes, this is what I did. I updated apt-get with the following command

this i installed with php curl for the version of php that i was using, mine was

Читайте также:  Что такое приставка экс

We can install any PHP7 Extensions which we are needed at the time of install Magento just use related command which you get error at the time of installin Magento

Thanks! Hope this will help you

If You have 404 or errors while sudo apt-get install php-curl just try

At the end You may want to restart services like: apache2 or php-fpm:

this worked for me.

Check if curl is on the installed modules list for current php:

First Login to your server and check the PHP version which is installed on your server.

And then run the following commands:

Replace the PHP version ( php7.2 ), with your PHP version.

then restart apache

I got an error that the CURL extension was missing whilst installing WebMail Lite 8 on WAMP (so on Windows).

After reading that libeay32.dll was required which was only present in some of the PHP installation folders (such as 7.1.26), I switched the PHP version in use from 7.2.14 to 7.1.26 in the WAMP PHP version menu, and the error went away.

install php70w-common.

It provides php-api, php-bz2, php-calendar, php-ctype, php-curl, php-date, php-exif, php-fileinfo, php-filter, php-ftp, php-gettext, php-gmp, php-hash, php-iconv, php-json, php-libxml, php-openssl, php-pcre, php-pecl-Fileinfo, php-pecl-phar, php-pecl-zip, php-reflection, php-session, php-shmop, php-simplexml, php-sockets, php-spl, php-tokenizer, php-zend-abi, php-zip, php-zlib.

Note: Note to Win32 Users In order to enable this module on a Windows environment, libeay32.dll and ssleay32.dll, or, as of OpenSSL 1.1 libcrypto-.dll and libssl-.dll, must be present in your PATH. Also libssh2.dll must be present in your PATH. You don’t need libcurl.dll from the cURL site.

Add your C:\wamp\bin\php\php7.1.15 to your PATH

Restart all services

Try it if you get E: Unable to locate package

Not the answer you’re looking for? Browse other questions tagged php curl php-7 or ask your own question.

Linked

Related

Hot Network Questions

Subscribe to RSS

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev 2021.9.16.40224

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Источник

How do I install PHP cURL on Linux Debian?

How do I install PHP cURL on Linux Debian? I tried the following code and got the error below

Читайте также:  мобилизационный людской резерв что это такое простыми словами

I resolved this issue. My Linux box was unable to browse and resolve hosts names. After adding appropriate roots, the issue was resolved.

3 Answers 3

Type in console as root:

1st, check your DNS config and if you can ping any host at all,

You should not use Ubuntu sources on Debian and vice versa.

I wrote an article on topis how to [manually install curl on debian linu][1]x.

And restart Apache. If you will have an error during point 6, try to run apt-get install build-essential.

Here’s what I did to get the latest curl version installed in Ubuntu:

Not the answer you’re looking for? Browse other questions tagged php linux curl or ask your own question.

Related

Hot Network Questions

Subscribe to RSS

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev 2021.9.16.40224

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Источник

Установка расширения curl на php

для просмотра модулей которые могу установить пишу:

выпадает список, смотрю есть ли мой(php5-curl) в нем.
смотрю есть, пишу:

что от меня требуется тут сделать подскажите пожалуйста чтобы установился модуль, спасибо.

2 ответа 2

Когда я отписывал что идет настройка «Настраивается пакет ttf-mscorefonts-installer» и «висит» это окно, там была кнопка «Ok» которая была неактивной и которая не нажималась. Я думал что это нужно просто обождать.

Оказалось что нужно было перейти на эту кнопку из клавиатуры «пробелом» и нажать окей. После этого установка заняла минуту от силы.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками php ubuntu apache или задайте свой вопрос.

Похожие

Подписаться на ленту

Для подписки на ленту скопируйте и вставьте эту ссылку в вашу программу для чтения RSS.

дизайн сайта / логотип © 2021 Stack Exchange Inc; материалы пользователей предоставляются на условиях лицензии cc by-sa. rev 2021.9.16.40224

Нажимая «Принять все файлы cookie» вы соглашаетесь, что Stack Exchange может хранить файлы cookie на вашем устройстве и раскрывать информацию в соответствии с нашей Политикой в отношении файлов cookie.

Источник

Образовательный портал