user1598655
user1598655

Reputation: 169

downloaded Django-1.4.1 and unable to tar

I am trying to download/install Django and the documentation on the Django website says to download Django-1.4.1.tar.gz file and then to issue these commands:

$ tar xzvf Django-1.4.1.tar.gz
$ cd Django-1.4.1
$ sudo python setup.py install

When I do tar xzvf Django-1.4.1.tar.gz I get:

$ tar xzvf Django-1.4.1.tar.gz
tar (child): Django-1.4.1.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

What can I do to resolve this?

Upvotes: 0

Views: 594

Answers (2)

pankaj28843
pankaj28843

Reputation: 2517

It seems like Django-1.4.1.tar.gz is not present in your current working directory. You can verify this by executing following command in terminal

$ ls -l Django-1.4.1.tar.gz

If file is present then you will see some details in command output otherwise you will need to switch to the directory in which you download Django-1.4.1.tar.gz in first place. For example - if you have downloaded Django-1.4.1.tar.gz in $HOME/Downloads then first switch to that directory before executing tar

$ cd ~/Downloads

Following commands should work if everything is correct -

$ tar xzvf Django-1.4.1.tar.gz
$ cd Django-1.4.1
$ sudo python setup.py install

Alternative

Download Django-1.4.1.tar.gz from command line itself and then unpack it using tar. Try following commands -

$ cd /tmp/
$ wget http://www.djangoproject.com/m/releases/1.4/Django-1.4.1.tar.gz
$ tar xzvf Django-1.4.1.tar.gz
$ cd Django-1.4.1
$ sudo python setup.py install

Upvotes: 5

LSerni
LSerni

Reputation: 57408

Strange as it may seem, the Django-1.4.1.tar.gz is not there. Either you mis-spelled, or there might be an error in the documentation (unlikely), maybe the name ends in .tgz instead of .tar.gz .

Or you are running those commands in a terminal with a different working directory from the one you downloaded the tar file in. Maybe, for example, the file is in /home/user/Downloads, but the terminal opens in /home/user. Check the file name and its location.

If you discover that the file is in /who/knows/what/dir/Django-1.4.1.tar.gz you can replace the first command with "tar xzvf /who/knows/what/dir/Django-1.4.1.tar.gz" and it should work.

Upvotes: 2

Related Questions