Установить php curl centos

Как установить php-curl в CentOS 8?

Как быстро установить php-curl на CentOS 8? Похоже, что он недоступен в базовом репозитории программного обеспечения или даже недоступен в EPEL.

[[email protected] ~]# dnf repolist repo id repo name AppStream CentOS-8 - AppStream BaseOS CentOS-8 - Base epel Extra Packages for Enterprise Linux 8 - x86_64 epel-modular Extra Packages for Enterprise Linux Modular 8 - x86_64 extras CentOS-8 - Extras [[email protected] ~]# dnf search php-curl Last metadata expiration check: 0:08:15 ago on Sat 18 Jul 2020 08:48:47 AM UTC. No matches found. [[email protected] ~]# dnf search php-* Last metadata expiration check: 0:08:26 ago on Sat 18 Jul 2020 08:48:47 AM UTC. ================================================== Name Matched: php-* ================================================== php-gd.x86_64 : A module for PHP applications for using the gd graphics library php-cli.x86_64 : Command-line interface for PHP php-fpm.x86_64 : PHP FastCGI Process Manager php-pdo.x86_64 : A database access abstraction module for PHP applications php-xml.x86_64 : A module for PHP applications which use XML php-dba.x86_64 : A database abstraction layer module for PHP applications php-dbg.x86_64 : The interactive PHP debugger php-gmp.x86_64 : A module for PHP applications for using the GNU MP library php-json.x86_64 : JavaScript Object Notation extension for PHP php-intl.x86_64 : Internationalization extension for PHP applications php-ldap.x86_64 : A module for PHP applications that use LDAP php-odbc.x86_64 : A module for PHP applications that use ODBC databases php-pear.noarch : PHP Extension and Application Repository framework php-snmp.x86_64 : A module for PHP applications that query SNMP-managed devices php-soap.x86_64 : A module for PHP applications that use the SOAP protocol php-devel.x86_64 : Files needed for building PHP extensions php-pgsql.x86_64 : A PostgreSQL database module for PHP php-common.x86_64 : Common files for PHP php-bcmath.x86_64 : A module for PHP applications for using the bcmath library php-recode.x86_64 : A module for PHP applications for using the recode library php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol php-mysqlnd.x86_64 : A module for PHP applications that use MySQL databases php-opcache.x86_64 : The Zend OPcache php-enchant.x86_64 : Enchant spelling extension for PHP applications php-process.x86_64 : Modules for PHP script using system process interfaces php-mbstring.x86_64 : A module for PHP applications which need multi-byte string handling php-pecl-zip.x86_64 : A ZIP archive management extension php-embedded.x86_64 : PHP library for embedding in applications php-pecl-apcu.x86_64 : APC User Cache php-pear-Date.noarch : Date and Time Zone Classes php-pear-Mail.noarch : Class that provides multiple interfaces for sending emails php-pear-Net-URL.noarch : Easy parsing of URLs php-pear-Net-SMTP.noarch : Provides an implementation of the SMTP protocol php-pear-Auth-SASL.noarch : Abstraction of various SASL mechanism responses php-pecl-apcu-devel.x86_64 : APCu developer files (header) php-pear-Cache-Lite.noarch : Fast and Safe little cache system for PHP php-pear-Net-Socket.noarch : Network Socket Interface php-pear-HTTP-Request.noarch : Provides an easy way to perform HTTP requests [[email protected] ~]# dnf search curl Last metadata expiration check: 0:10:34 ago on Sat 18 Jul 2020 08:48:47 AM UTC. ============================================== Name Exactly Matched: curl =============================================== curl.x86_64 : A utility for getting files from remote servers (FTP, HTTP, and others) ============================================= Name & Summary Matched: curl ============================================== collectd-curl.x86_64 : Curl plugin for collectd qemu-kvm-block-curl.x86_64 : QEMU CURL block driver collectd-curl_xml.x86_64 : Curl XML plugin for collectd collectd-curl_json.x86_64 : Curl JSON plugin for collectd perl-WWW-Curl.x86_64 : Perl extension interface for libcurl python3-pycurl.x86_64 : Python interface to libcurl for Python 3 libcurl-devel.i686 : Files needed for building applications with libcurl libcurl-devel.x86_64 : Files needed for building applications with libcurl libcurl-minimal.i686 : Conservatively configured build of libcurl for minimal installations libcurl-minimal.x86_64 : Conservatively configured build of libcurl for minimal installations ================================================== Name Matched: curl =================================================== libcurl.x86_64 : A library for getting files from web servers libcurl.i686 : A library for getting files from web servers ================================================= Summary Matched: curl ================================================= rubygem-curb.x86_64 : Ruby libcurl bindings 

4 ответа

Это доступно из php-common распространено в AppStream репозиторий, который должен быть включен по умолчанию. Убедитесь, что он включен, а затем просто запустите:

Читайте также:  Php expecting end of file

Примечание:
пока dnf search php-curl ничего не покажет, dnf install php-curl установлю php-common .

Довольно поздно, но для всех, у кого такая же проблема, я обнаружил, что это связано с обновлением PHP (с 5.6 до 7.2 в моем случае); не все зависимости были должным образом обновлены.

Попробуйте выполнить диагностику, открыв PHP в оболочке (просто введите php ). Если вы видите подобное предупреждение (обратите внимание на undefined symbol: curl_pushheader_bynum ближе к концу):

PHP Warning: PHP Startup: Unable to load dynamic library 'curl' (tried: /usr/lib64/php/modules/curl (/usr/lib64/php/modules/curl: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/curl.so (/usr/lib64/php/modules/curl.so: undefined symbol: curl_pushheader_bynum)) in Unknown on line 0 

Вероятно, у вас устаревшая версия библиотеки curl. Не знаю, почему php-common пакет не имеет зависимости от версии для этого, поэтому он обновляется, но я исправил это с помощью dnf update libcurl . Перезапустил php/nginx и все заработало!

(примечание: если вы не используете dnf , вы должны просто иметь возможность использовать yum вместо этого т.е. yum update libcurl )

Источник

centos 8 install php-curl

ini file comes from in CentOS. These are all of the default configuration files that are installed by the php-common package, we can see here that by default the php. ini file is found at /etc/php.

How do you check if PHP cURL is installed?

you can check by putting these code in php file. You can always create a new page and use phpinfo() . Scroll down to the curl section and see if it is enabled.

How do I enable cURL?

  1. Open php. ini (it’s usually in /etc/ or in php folder on the server).
  2. Search for extension=php_curl. dll. Uncomment it by removing the semi-colon( ; ) in front of it.
  3. Restart the Apache Server.

Is curl free?

curl is free and open source software and exists thanks to thousands of contributors and our awesome sponsors. The curl project follows well established open source best practices. You too can help us improve!

How do I enable PHP curl extensions?

  1. Open php. ini file located under php installation folder.
  2. Search for extension=php_curl. dll.
  3. Uncomment it by removing the semi-colon(;) in front of it.
  4. Restart the Apache Server.

How do I update my curl?

  1. Step 1 : .
  2. Install the tools to compile this release and curl dependencies: apt-get update. .
  3. Download and install the latest release from http://curl.haxx.se/download.html. .
  4. Update the system’s binaries and symbol lookup (which libcurl your curl loads): mv /usr/bin/curl /usr/bin/curl.bak.

How do I know if my curls are running?

To check whether the Curl package is installed on your system, open up your console, type curl , and press enter. If you have curl installed, the system will print curl: try ‘curl —help’ or ‘curl —manual’ for more information . Otherwise, you will see something like curl command not found .

How do I manually install curls?

  1. Go to destination folder. In my Ubuntu destination folder is “Download” cd /usr/local/src.
  2. Download latest Curl package. Download latest Curl package. In the time of post update it’s 7.45. .
  3. Unzip it and go to newly created folder. tar -xvzf curl-7.36.0.tar.gz rm *.gz cd curl-7.36.0.

Does BusyBox have curl?

There’s a ‘wget’ in BusyBox, there’s no curl there (it is not the actual wget, just a stripped down clone with the same name).

How to Change Git Commit Message

Commit

To change the most recent commit message, use the git commit —amend command. To change older or multiple commit messages, use git rebase -i HEAD~N . .

OpenVAS Ubuntu Installation and Tutorial

Openvas

Install OpenVAS 9 on Ubuntu 18.04 LTSStep 1 – Add PPA Repository. Execute all commands in root user. . Step 2 – Update System. . Step 3 – Install .

5 Best Ebook Readers for Linux

Ebook

Best eBook readers for LinuxCalibre. Calibre is one of the most popular eBook apps for Linux. . FBReader. FBReader is an open-source, lightweight, m.

Latest news, practical advice, detailed reviews and guides. We have everything about the Linux operating system

Источник

centos 7 install php-curl

ini file comes from in CentOS. These are all of the default configuration files that are installed by the php-common package, we can see here that by default the php. ini file is found at /etc/php.

How do I update php curl?

  1. Step 1: Install PHP libraries for the server by running the following command: $ sudo add-apt-repository ppa:ondrej/php.
  2. Step 2: Then, update the server: $ sudo apt update.
  3. Step 3: Now, install CURL.

How do I enable curl on Linux server?

  1. Update your Ubuntu box, run: sudo apt update && sudo apt upgrade.
  2. Next, install cURL, execute: sudo apt install curl.
  3. Verify install of curl on Ubuntu by running: curl —version.

How do you check if PHP Curl is installed?

you can check by putting these code in php file. You can always create a new page and use phpinfo() . Scroll down to the curl section and see if it is enabled.

How do I enable curl?

  1. Open php. ini (it’s usually in /etc/ or in php folder on the server).
  2. Search for extension=php_curl. dll. Uncomment it by removing the semi-colon( ; ) in front of it.
  3. Restart the Apache Server.

What does PHP-FPM do?

A: PHP-FPM (FastCGI Process Manager) is a web tool used to speed up the performance of a website. It is much faster than traditional CGI based methods and has the ability to handle tremendous loads simultaneously.

How do I know if PHP is installed on CentOS?

  1. Open a bash shell terminal and use the command “php –version” or “php -v” to get the version of PHP installed on the system. .
  2. You can also check for the package versions installed on the system to get the PHP version. .
  3. Let’s create a PHP file with content as shown below.

Where does PHP get installed?

On Windows the default path for the php. ini file is the Windows directory. If you’re using the Apache webserver, php. ini is first searched in the Apaches install directory, e.g. c:\program files\apache group\apache .

Is curl free?

curl is free and open source software and exists thanks to thousands of contributors and our awesome sponsors. The curl project follows well established open source best practices. You too can help us improve!

How do I update my curl?

  1. Step 1 : .
  2. Install the tools to compile this release and curl dependencies: apt-get update. .
  3. Download and install the latest release from http://curl.haxx.se/download.html. .
  4. Update the system’s binaries and symbol lookup (which libcurl your curl loads): mv /usr/bin/curl /usr/bin/curl.bak.

How do I enable PHP curl extensions?

  1. Open php. ini file located under php installation folder.
  2. Search for extension=php_curl. dll.
  3. Uncomment it by removing the semi-colon(;) in front of it.
  4. Restart the Apache Server.

How to install flameshot screenshot software on Ubuntu / Arch / Fedora

Flameshot

How do I download Flameshot on Ubuntu?How do I use Flameshot in Fedora?How do I download Flameshot on Linux?How install Flameshot Arch Linux?What is F.

TrueOS Doesn't Want to Be 'BSD for Desktop' Anymore

Freebsd

What happened to TrueOS?Is FreeBSD good for desktop?Why is FreeBSD dying?Which BSD for laptop?Is FreeBSD dead?What kernel does BSD use?Does Netflix us.

How to install multiple versions of GCC and G on Ubuntu 20.04

Version

Installing multiple GCC compiler versions on Ubuntu 20.04 LTSinstalling GCC-7 GCC-8. . install GCC -9 repository. . Install GCC-9 on Ubuntu 20.04.

Latest news, practical advice, detailed reviews and guides. We have everything about the Linux operating system

Источник

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