Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to install django. I have the following instructions to do this:

    wget "http://www.djangoproject.com/download/1.4/tarball/" -O Django-1.4.tar.gz
    tar xzvf Django-1.4.tar.gz
    cd Django-1.4
    sudo python setup.py install

when I run the second line (i.e., tar xzvf Django-1.4.tar.gz) then I get the following message:

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

Is there any problem? Please help me.

share|improve this question
    
Probably: wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.djangoproject.com" ... –  user159550 May 17 '13 at 12:21
add comment

3 Answers 3

The error can mean 2 things depending on what file you downloaded. In the normal sense, when users download a file not ending with .gz it means the file is not a gzip format.

The other case is when the downloaded file is corrupted. I took my time to download the http://www.djangoproject.com/download/1.4/tarball/ file and it works with the line you are mentioning so it must mean the file was downloaded and somehow got corrupted. Download the file again.

Just to add that I had a problem about a year ago, similar to this, it was a memory problem. One of the memory slots was damaged (Memtest verified this). This is of course an extreme case, but wanted to mention it just in case.

What I would suggest is to do the following:

  1. Download file like this: wget http://www.djangoproject.com/download/1.4/tarball/ -O Django-1.4.tar.gz
    (No double quotes, just in case when copied from a website, they were the bbcode double codes and not the common ones used in the terminal)

  2. Decompress like you mentioned: tar xzvf Django-1.4.tar.gz

See if that works.

share|improve this answer
    
do the following, on your browser, go to djangoproject.com/download/1.4/tarball it will automatically start downloading the file. Test with that. –  Luis Alvarado Mar 22 '13 at 18:25
    
No no. My problem solved. Thank you. –  user543489 Mar 22 '13 at 18:27
add comment

From http://stackoverflow.com/questions/3950839/tar-error-is-not-recoverable-exiting-now

mv Doctrine-1.2.0.tgz Doctrine-1.2.0.tar.gz
gunzip Doctrine-1.2.0.tar.gz
tar xf Doctrine-1.2.0.tar
share|improve this answer
add comment

Please forget about running setup.py from source!

Use pip to install Python packages. It's so much easier and preferred over easy_install / setup.py (Why use pip over easy_install?).

It's as easy as:

  1. Install pip by installing the Ubuntu package: python-pip Install python-pip
  2. Install any package from PyPI like this:

    sudo pip install Django
    

Done. Replace Django with any other package from PyPI.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.