[英]cURL not found in wordpress on AWS EC2 instance
在我的 Wordpress 站点上, cURL
命令似乎不起作用:
当我登录 Wordpress 时,它清楚地cURL
未安装:
但是,当我将 SSH 放入我的 EC2 实例时,我显示已安装 cURL:
$ curl --version
curl 7.58.0 (x86_64-pc-linux-gnu) libcurl/7.58.0 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.3.0 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Release-Date: 2018-01-24
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL
因为 PHP 已过时,可能是 PHP 问题? 当我检查我的 PHP 版本时,我显示我安装了最新版本:
$ php -v
PHP 8.2.1 (cli) (built: Jan 13 2023 10:42:21) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.1, Copyright (c) Zend Technologies
with Zend OPcache v8.2.1, Copyright (c), by Zend Technologies
但是当我列出我所有的 PHP 安装时,我看到最上面的那个对应于 Wordpress ( 7.3.33-9+ubuntu18.04.1+deb.sury.org+1 ) 中提到的那个:
$ dpkg --list | grep php
ii libapache2-mod-php7.3 7.3.33-9+ubuntu18.04.1+deb.sury.org+1 amd64 server-side, HTML-embedded scripting language (Apache 2 module)
ii libapache2-mod-php8.2 8.2.1-2+ubuntu18.04.1+deb.sury.org+1 amd64 server-side, HTML-embedded scripting language (Apache 2 module)
ii php 2:8.2+93+ubuntu18.04.1+deb.sury.org+2 all server-side, HTML-embedded scripting language (default)
ii php-common 2:93+ubuntu18.04.1+deb.sury.org+2 all Common files for PHP packages
ii php-curl 2:8.2+93+ubuntu18.04.1+deb.sury.org+2 all CURL module for PHP [default]
ii php-fpm 2:8.2+93+ubuntu18.04.1+deb.sury.org+2 all server-side, HTML-embedded scripting language (FPM-CGI binary) (default)
ii php-gd 2:8.2+93+ubuntu18.04.1+deb.sury.org+2 all GD module for PHP [default]
ii php-mbstring 2:8.2+93+ubuntu18.04.1+deb.sury.org+2 all MBSTRING module for PHP [default]
rc php7.0-curl 7.0.33-0ubuntu0.16.04.2 amd64 CURL module for PHP
ii php7.2-cli 7.2.34-37+ubuntu18.04.1+deb.sury.org+1 amd64 command-line interpreter for the PHP scripting language
ii php7.2-common 7.2.34-37+ubuntu18.04.1+deb.sury.org+1 amd64 documentation, examples and common module for PHP
ii php7.2-curl 7.2.34-37+ubuntu18.04.1+deb.sury.org+1 amd64 CURL module for PHP
ii php7.2-fpm 7.2.34-37+ubuntu18.04.1+deb.sury.org+1 amd64 server-side, HTML-embedded scripting language (FPM-CGI binary)
ii php7.2-gd 7.2.34-37+ubuntu18.04.1+deb.sury.org+1 amd64 GD module for PHP
ii php7.2-json 7.2.34-37+ubuntu18.04.1+deb.sury.org+1 amd64 JSON module for PHP
ii php7.2-mbstring 7.2.34-37+ubuntu18.04.1+deb.sury.org+1 amd64 MBSTRING module for PHP
ii php7.2-mysql 7.2.34-37+ubuntu18.04.1+deb.sury.org+1 amd64 MySQL module for PHP
ii php7.2-opcache 7.2.34-37+ubuntu18.04.1+deb.sury.org+1 amd64 Zend OpCache module for PHP
ii php7.2-readline 7.2.34-37+ubuntu18.04.1+deb.sury.org+1 amd64 readline module for PHP
ii php7.3 7.3.33-9+ubuntu18.04.1+deb.sury.org+1 all server-side, HTML-embedded scripting language (metapackage)
ii php7.3-cli 7.3.33-9+ubuntu18.04.1+deb.sury.org+1 amd64 command-line interpreter for the PHP scripting language
ii php7.3-common 7.3.33-9+ubuntu18.04.1+deb.sury.org+1 amd64 documentation, examples and common module for PHP
ii php7.3-json 7.3.33-9+ubuntu18.04.1+deb.sury.org+1 amd64 JSON module for PHP
ii php7.3-mysql 7.3.33-9+ubuntu18.04.1+deb.sury.org+1 amd64 MySQL module for PHP
ii php7.3-opcache 7.3.33-9+ubuntu18.04.1+deb.sury.org+1 amd64 Zend OpCache module for PHP
ii php7.3-readline 7.3.33-9+ubuntu18.04.1+deb.sury.org+1 amd64 readline module for PHP
ii php8.2 8.2.1-2+ubuntu18.04.1+deb.sury.org+1 all server-side, HTML-embedded scripting language (metapackage)
ii php8.2-cli 8.2.1-2+ubuntu18.04.1+deb.sury.org+1 amd64 command-line interpreter for the PHP scripting language
ii php8.2-common 8.2.1-2+ubuntu18.04.1+deb.sury.org+1 amd64 documentation, examples and common module for PHP
ii php8.2-curl 8.2.1-2+ubuntu18.04.1+deb.sury.org+1 amd64 CURL module for PHP
ii php8.2-fpm 8.2.1-2+ubuntu18.04.1+deb.sury.org+1 amd64 server-side, HTML-embedded scripting language (FPM-CGI binary)
ii php8.2-gd 8.2.1-2+ubuntu18.04.1+deb.sury.org+1 amd64 GD module for PHP
ii php8.2-mbstring 8.2.1-2+ubuntu18.04.1+deb.sury.org+1 amd64 MBSTRING module for PHP
ii php8.2-opcache 8.2.1-2+ubuntu18.04.1+deb.sury.org+1 amd64 Zend OpCache module for PHP
ii php8.2-readline 8.2.1-2+ubuntu18.04.1+deb.sury.org+1 amd64 readline module for PHP
我也试过从 AWS EC2 仪表板重新启动。
lel,你有 php7.0-curl 和 php7.2-curl 和 php8.2-curl,但是你在 1 php 上运行 WordPress 而你没有 curl:php7.3
sudo apt update;
sudo apt install php7.3-curl;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.