Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
463 views
in Technique[技术] by (71.8m points)

php - Pear - succeeded, but it is not a valid package

During a pecl package installation, i got the error,

Download of "pecl/pecl_http" succeeded, but it is not a valid package archive
Error: cannot download "pecl/pecl_http"

This error is coming for all the packages. So i tried the solution given here, http://cweiske.de/tagebuch/pear-php-5.5.htm. But it is not working. And i don't have any other clue on this. It would be really helpful if someone explains what exactly the problem is. Please help.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This bug commonly affects systems upgraded to Ubuntu 14.04 LTS from Ubuntu 12.04 LTS.

There is a workaround for php5-5.5.9 as commented by kolAflash on Launchpad.

The workaround contains a small typo (tar instead of tgz), so I provide a working solution:

# First run pear to download the packages. It will probably put the packages into
# /build/buildd/php5-5.5.9+dfsg/pear-build-download/
# but it can't install them.
$ pear upgrade

# Un-Gzip the downloaded packages.
$ gunzip /build/buildd/php5-5.5.9+dfsg/pear-build-download/*.tgz

# Now pear should be able to work with the pure tar-files.
$ pear upgrade /build/buildd/php5-5.5.9+dfsg/pear-build-download/*.tar

All credit for this workaround obviously goes to kolAflash.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...