[英]How to install php-curl in Ubuntu 16.04
升級到Ubuntu 16.04
並在安裝PHP5
后Ubuntu 16.04
問題。
安裝 PHP-5 如下:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install php5.5 # for PHP 5.5
試圖安裝 php-curl 但它不起作用。
sudo apt-get install php5-curl
錯誤:E:無法定位包 php5-curl
在 Ubuntu 16.04 默認的 PHP 版本是 7.0,如果你想使用不同的版本,那么你需要根據 PHP 版本安裝 PHP 包:
sudo apt-get install php7.4-curl
sudo apt-get install php7.3-curl
sudo apt-get install php7.2-curl
sudo apt-get install php7.1-curl
sudo apt-get install php7.0-curl
sudo apt-get install php5.6-curl
sudo apt-get install php5.5-curl
這對我有用。
sudo apt-get install php-curl
這對我有用:
sudo apt-get install php5.6-curl
做:
apt-get update
接着:
apt-get install php5-curl
在 Ubuntu 16.04 和衍生版本上安裝 cURL 7.49.0
wget http://curl.haxx.se/download/curl-7.49.0.tar.gz
tar -xvf curl-7.49.0.tar.gz
cd curl-7.49.0/
./configure
make
sudo make install
對於 Ubuntu 18.04 或 PHP 7.2 用戶,您可以執行以下操作:
apt-get install php7.2-curl
您可以通過運行php -v
來檢查您的 PHP 版本,以驗證您的 PHP 版本並獲得正確的 curl 版本。
sudo apt-get install php5.6-curl
並重新啟動網絡瀏覽器。
您可以通過運行php -m | grep curl
檢查模塊php -m | grep curl
php -m | grep curl
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt install php8.0-curl
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.