首页 > 解决方案 > PECL 安装失败,tgz 文件无效

问题描述

我有两个 vagrant 实例,运行 Ubuntu 16.04。一个是我们很长一段时间以来一直用于开发我们的软件的开发机器。另一个是非常干净的安装,设置只是为了测试它。

我在两台服务器上运行这个命令:

sudo pecl install grpc

在开发服务器上,我们还有很多其他事情要做,我得到这个输出:

vagrant@ubuntu-xenial:/vagrant$ sudo pecl install grpc
downloading grpc-1.27.0.tgz ...
Starting to download grpc-1.27.0.tgz (3,196,501 bytes) 
......................................................................
done: 3,196,501 bytes
Could not get contents of package "/tmp/pear/download/grpc-1.27.0.tgz". 
Invalid tgz file.
Download of "pecl/grpc" succeeded, but it is not a valid package archive
Error: cannot download "pecl/grpc"
Download failed
install failed

在干净的机器上它工作得很好,安装运行顺利。

有谁知道这里可能是什么问题?

标签: phppearpecl

解决方案


好吧,所以我找到了解决方案。凭直觉,我尝试了chmod -R 777 /tmp,然后再次运行安装命令。

像魅力一样工作。


推荐阅读