gzip gives unexpected end of file error for Moodle 2.5.1

gzip gives unexpected end of file error for Moodle 2.5.1

by Patrick Stack -
Number of replies: 8

I'm having a problem uncompressing the latest moodle stable file (2.5.1).

I'm running Ubuntu 11.04 on a VM and have ssh root to same.

Basically the command "tar -zxvf moodle-latest-25.tgz"

breaks at the line "moodle/lib/csconvtbl/big5.tbl" giving the following error:

gzip: unexpected end of file

tar: unexpected EOF in archive

tar: unexpected EOF in archive

tar: error is not recoverable: exiting now

The moodle directory is created alright, but it is missing the admin directory (and perhaps some others I don't know about).

I thought at first that the problem was with a corrupt download as I downloaded and then uploaded to server by ftp in ssh mode.
So I grabbed the archive using git as in the manual, but I still get the same error in the same place with the same result.

I've been fighting with this for the last day and seem to be getting nowhere.

Any help would be very much appreciated.

Thanks

Average of ratings: -
In reply to Patrick Stack

Re: gzip gives unexpected end of file error for Moodle 2.5.1

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
This is for the tar archive at the top of http://download.moodle.org right now:

$ ls -l moodle-latest-25.tgz
-rw-r--r-- 1 user group 31917099 Sep 4 21:00 moodle-latest-25.tgz

$ file moodle-latest-25.tgz
moodle-latest-25.tgz: gzip compressed data, from Unix, last modified: Fri Aug 30 06:13:25 2013

$ md5sum moodle-latest-25.tgz
a9bfb8fb4f56a4f389755709dcadbc8e moodle-latest-25.tgz


BTW, are you aware that Git is the recommended tool for downloading Moodle? See http://docs.moodle.org/25/en/Git_for_Administrators.

Finally, my version of installing Moodle on Debian-based distributions is here: http://www.syndrega.ch/?p=38.
Average of ratings: Useful (1)
In reply to Visvanath Ratnaweera

Re: gzip gives unexpected end of file error for Moodle 2.5.1

by Patrick Stack -

Thank you for your prompt reply Visvanath, and the link to your version of installing Moodle.

I did try Git after I had problems uncompressing the file downloaded via website, but ran into the very same problems.

Thanks for the checksum also - I couldn't seem to find it anywhere on the Moodle site. I will try again later today when I get back to the office.

In reply to Patrick Stack

Re: gzip gives unexpected end of file error for Moodle 2.5.1

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Patrick

> I did try Git after I had problems uncompressing the file downloaded via website,

Git should be everyone's _first_ choice.

> but ran into the very same problems.

Must be a problem with your host. File quota exhausted? Other performance caps or timeouts?

> Thanks for the checksum also - I couldn't seem to find it anywhere on the Moodle site.

I too looked for it in the download site. May be these archives are meant for Windows users who don't have have a simple MD5 tool!
;-(
In reply to Visvanath Ratnaweera

Re: gzip gives unexpected end of file error for Moodle 2.5.1

by Patrick Stack -

Hi Visvanath.

I was away for the weekend and so didn't get the chance to redownload the latest Moodle and check with MD5sum. What is the md5sum for today's version?

Many thanks

In reply to Patrick Stack

Re: gzip gives unexpected end of file error for Moodle 2.5.1

by Ken Task -
Picture of Particularly helpful Moodlers

Might be wrong, but don't think git uses tar.gz unless told to do so.  Uses pack.

'same error in same place' ... is strange.

So did you run git on the server or did run run git locally then binary FTP the code directory to the server?

Is this the command you used:

git clone git://git.moodle.org/moodle.git

That should create a moodle directory with all the files acquired for 2.6dev version of Moodle.   There is a hidden .git directory in moodle.

To complete the git setup one has to change into the moodle directory to issue the track branch and checkout commands.

'spirit of sharing', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: gzip gives unexpected end of file error for Moodle 2.5.1

by Patrick Stack -

Thanks for your reply Ken.

I ran git on the server via ssh as root second time round using the command git command as found in the Installation instructions on the Moodle website i.e.

git clone -b MOODLE_25_STABLE git://git.moodle.org/moodle.git

while in the /var/www directory and it seemed to download fine (with the right file size and all). However nothing happened after that - no moodle directory was created as it says will happen in the instructions. So I ran the uncompress command: tar -zxvf moodle_latest.tgz (I forget the exact filename) with the results as outlined in my first post.

Perhaps I'm missing a step?

In reply to Patrick Stack

Re: gzip gives unexpected end of file error for Moodle 2.5.1

by Ken Task -
Picture of Particularly helpful Moodlers

Yes, that command shortens the longer version I shared.  Strange it didn't create a 'moodle' directory though because it's the first step in the process.  See ** below.

Git doesn't download a tar.gz and then un-compress.

git clone -b MOODLE_25_STABLE git://git.moodle.org/moodle.git
** Cloning into 'moodle'...
remote: Counting objects: 680419, done.
remote: Compressing objects: 100% (159978/159978), done.
remote: Total 680419 (delta 505428), reused 679980 (delta 504994)
Receiving objects: 100% (680419/680419), 248.56 MiB | 1.20 MiB/s, done.
Resolving deltas: 100% (505428/505428), done.
Checking out files: 100% (11796/11796), done.

After the above, one should end up with a 'moodle' directory with all the files/folders for version 2.5.1+.

It really would be to your advantage to get this to work.  Makes updating/upgrading much easier.

While the following is more commands, one does have to get a directory before going any further:

git clone git://git.moodle.org/moodle.git [nameofdir]
cd [nameofdir]
git branch -a
git branch --track MOODLE_25_STABLE origin/MOODLE_25_STABLE
git checkout MOODLE_25_STABLE

Something else is amiss on your system.  When installing git via however you do that, did it have additional files (dependencies)?  Seem to recall that one needed a perl-git of some sort.

'spirit of sharing', Ken

In reply to Patrick Stack

RESOLVED: Re: gzip gives unexpected end of file error for Moodle 2.5.1

by Patrick Stack -

I'm happy to say that I've resolved this.

I followed the instructions in the Git for Administrators on MoodleDocs step-by-step (under Obtaining the Code from Git section) and it worked a treat.

Thanks again to Visvanath and Ken for your help.