首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >更新到Ubuntu20.04后,“此服务器上没有安装”“cURL”

问更新到Ubuntu20.04后,“此服务器上没有安装”“cURL”
EN

Ask Ubuntu用户
提问于 2020-11-15 19:18:17
回答 1查看 4.6K关注 0票数 2

我最近更新了我的Ubuntu从16.04到18.04,然后从18.04到20.04。现在,我的Wordpress站点上的两个插件给了我以下错误:

1- OneSignal Push:cURL is not installed on this server. cURL is required to send notifications. Please make sure cURL is installed on your server before continuing.

2- Composer detected issues in your platform: Your Composer dependencies require the following PHP extensions to be installed: curl

到目前为止,我已经在互联网上尝试过所有相关的解决方案,但都无法解决这个问题。我运行了sudo apt-get install curl,但是没有什么改变。我还得到了这个:curl is already the newest version (7.68.0-1ubuntu2.2)。

apt-cache policy php7.4-curl输出

代码语言:javascript
复制
php7.4-curl:
  Installed: (none)
  Candidate: 7.4.3-4ubuntu2.4
  Version table:
     7.4.12-3+ubuntu16.04.1+deb.sury.org+1 -1
        100 /var/lib/dpkg/status
     7.4.3-4ubuntu2.4 500
        500 http://mirrors.digitalocean.com/ubuntu focal-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
     7.4.3-4ubuntu1 500
        500 http://mirrors.digitalocean.com/ubuntu focal/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
EN

回答 1

Ask Ubuntu用户

发布于 2020-11-15 19:31:34

包卷曲包含命令行接口,基本上是命令curl。但是WordPress (包括它的插件)是用PHP开发的,PHP不能仅仅使用命令行版本的cURL。PHP需要相应的扩展。

在Ubuntu中,有几个PHP扩展被打包成自己的包,比如php-mysql或undefined。在cURL的例子中,扩展包将是undefined。这大概就是你想要的。

顺便提一句:php-curl本身并不包含PHP扩展。这是由php-curl所依赖的相应PHP版本的包提供的。因此,如果您在Ubuntu20.04上安装php-curl,它也会安装php7.4-curl,因为Ubuntu20.04附带了PHP7.4。

票数 4
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1292613

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档