Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 2
Invalid tgz file, not a valid package archive (Magento Connect)
 
MP-Rich
Jr. Member
 
Total Posts:  10
Joined:  2009-04-17
 

I tried to install an extension today running Magento 1.3.0 and got the following error:

downloading Minerva_Shipping-1.2.1.tgz ...
Starting to download Minerva_Shipping-1.2.1.tgz (8,021 bytes)
. . ...done: 8,021 bytes
Could not get contents of package “/home/public_html/magento/downloader/pearlib/download/Minerva_Shipping-1.2.1.tgz”. Invalid tgz file.
Download of “magento-community/Minerva_Shipping” succeeded, but it is not a valid package archive
Error: cannot download “magento-community/Minerva_Shipping”
Install Errors
Download failed
PEAR ERROR: install failed

I have checked the downloader/pearlib/cache and downloader/pearlib/download folders and they both contain files, so the download as far as I can tell succeeded, however Magento thinks the archive file is invalid.  I have tried another extension as well (just in case this particualr one was corrupted) and got the same error.

Can anyone help?

 
Magento Community Magento Community
Magento Community
Magento Community
 
myst2
Jr. Member
 
Total Posts:  4
Joined:  2009-03-31
 

I got exactly the same error, i’m waiting for my host provider to solve this or give me an answer.

 
Magento Community Magento Community
Magento Community
Magento Community
 
bschiett
Jr. Member
 
Total Posts:  14
Joined:  2008-11-02
 
myst2 - 26 April 2009 03:30 AM

I got exactly the same error, i’m waiting for my host provider to solve this or give me an answer.

see this thread

http://osdir.com/ml/php.pear.qa/2007-07/msg00032.html

the file you need to fix is in

./downloader/pearlib/php/Archive/Tar.php

i just tried it and it seems to work..

 
Magento Community Magento Community
Magento Community
Magento Community
 
MP-Rich
Jr. Member
 
Total Posts:  10
Joined:  2009-04-17
 

Just tried the above but didn’t work for me, same error.

 
Magento Community Magento Community
Magento Community
Magento Community
 
bschiett
Jr. Member
 
Total Posts:  14
Joined:  2008-11-02
 
MP-Rich - 26 April 2009 11:28 PM

Just tried the above but didn’t work for me, same error.

you have to manually apply the fix mentioned on the above url.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MP-Rich
Jr. Member
 
Total Posts:  10
Joined:  2009-04-17
 

Yes I tried that, edited Tar.php, commented out the old listContent() function and manually entered the amended one from the URL above.  Unfortunately I get exactly the same error message.

Also the amended function has a couple of errors that need fixing first anyway - you can’t just copy and paste it from the URL.  The first are the spurious + and - signs placed before the IF statements and the entire function needs a closing brace before it will work.

Is there anything I have missed?  Is it just the Tar.php file that needs updating or is there something else I need to do?

 
Magento Community Magento Community
Magento Community
Magento Community
 
bschiett
Jr. Member
 
Total Posts:  14
Joined:  2008-11-02
 
MP-Rich - 26 April 2009 11:53 PM

Yes I tried that, edited Tar.php, commented out the old listContent() function and manually entered the amended one from the URL above.  Unfortunately I get exactly the same error message.

Also the amended function has a couple of errors that need fixing first anyway - you can’t just copy and paste it from the URL.  The first are the spurious + and - signs placed before the IF statements and the entire function needs a closing brace before it will work.

Is there anything I have missed?  Is it just the Tar.php file that needs updating or is there something else I need to do?

you have to remove the lines which have a - sign in front of them, and add the lines that have a + sign.
it’s standard notation for file patches.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MP-Rich
Jr. Member
 
Total Posts:  10
Joined:  2009-04-17
 

Oops, my bad! hmmm

Ok, I tried it again (properly this time!) and still get the same error.

 
Magento Community Magento Community
Magento Community
Magento Community
 
rage-systems
Jr. Member
 
Total Posts:  6
Joined:  2009-05-02
 

has anybody found a solution to this?, i tried replacing tar.php with my local version and it seems to download but nothing is installed.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MP-Rich
Jr. Member
 
Total Posts:  10
Joined:  2009-04-17
 

It seems like the problem may be related to specific installations of Magento as bschiett obviously has fixed theirs with the file patch.  Maybe it’s a file/folder permissions problem?

 
Magento Community Magento Community
Magento Community
Magento Community
 
bschiett
Jr. Member
 
Total Posts:  14
Joined:  2008-11-02
 
MP-Rich - 07 May 2009 11:23 PM

It seems like the problem may be related to specific installations of Magento as bschiett obviously has fixed theirs with the file patch.  Maybe it’s a file/folder permissions problem?

if you search with google for the error you will find that the bug is not specific to magento but has something to do with a broken package (Archive/Tar?) in the pear repository.

we fixed it by applying the patch for which i posted the link earlier.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MP-Rich
Jr. Member
 
Total Posts:  10
Joined:  2009-04-17
 

Hi bschiett, I have applied the file patch as mentioned in the link you posted, but still have the same problem.  I did have some issues when I first installed Magento with the default permissions on files and folders and I had to chmod many of them to lower permission status for Group.

I don’t know enough about Unix to proactively seek a solution to any potential problem with file permissions, but considering you have fixed the error with the patch whereas my problem still remains, I presume the issue lies somewhere else and not directly with the amended file.  What do you think?

 
Magento Community Magento Community
Magento Community
Magento Community
 
rage-systems
Jr. Member
 
Total Posts:  6
Joined:  2009-05-02
 

Right ok, as i said before i do have a local copy of magento working very well, i tried the method above and it still didnt work, is there anything i can take out of my local copy to upload to my server?

 
Magento Community Magento Community
Magento Community
Magento Community
 
rage-systems
Jr. Member
 
Total Posts:  6
Joined:  2009-05-02
 

Problem fixed for me, heres the solution go to downloader/pearlib/ and delete pear.ini, dont worry as it will rebuild itself when you go to magento connect again.

hopes this helps someone.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MP-Rich
Jr. Member
 
Total Posts:  10
Joined:  2009-04-17
 

Rage you are a star!  Works for me too!  Many thanks guys grin

 
Magento Community Magento Community
Magento Community
Magento Community
 
chiguy
Jr. Member
 
Total Posts:  9
Joined:  2009-02-20
 

Upgrading from PHP 5.2.6 -> 5.2.10 fixed it for me.  So may be a PHP issue.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2