Error when opening .tar.gz via Shell to install Apache Maven

Machine:

Mac OSX 10.5.8 32-bit.


Goal:

To install apache maven per its websites instructions, in order to install the JUNG package according to its install instructions, so I can use the JUNG classes in various Java GUIs.


What I Did:

Downloaded a .tar.gz file, and using the shell, moved it to a directory (using mv) I created for it (using mkdir), usr/local/apache-maven per the website directions I downloaded the file apache-maven-3.0.4-bin.tar.gz. Next I tried extracting the file using tar -zxvf apache-maven-3.0.4-bin.tar.gz.


Error:

I get an error message when I try to extract the apache-maven .gz (install?) file in shell.

tar: apache-maven-3.0.4/direcoryandfile: Cannot open: No such file or directory
... 
apache-maven-3.0.4/lib/ext: Cannot mkdir: No such file or directory apache-maven-3.0.4/lib/ext/README.txt 
tar: apache-maven-3.0.4/lib/ext/README.txt: Cannot open: No such file or directory tar:       
Error exit delayed from previous errors

Instructions:

For the maven building

  1. Extract the distribution archive, i.e. apache-maven-3.0.4-bin.tar.gz to the directory you wish to install Maven 3.0.4... The subdirectory apache-maven-3.0.4 will be created from the archive. ...

for the JUNG installation

Appendix: How to Build JUNG

Get Maven

Download and install maven2 from maven.apache.org: http://maven.apache.org/download.html. At time of writing (early June 2012), the latest version was maven-3.0.4. Install the downloaded maven2 (there are installation instructions on the Maven website).

Follow the installation instructions and confirm a successful installation by typing 'mvn --version' in a command terminal window.


Self-Rectification Attempts

From what I can tell the archive file is missing some directories or something. I tried deleting the file, redownloading the .tar.gz file from a different mirror and repeating the process. Same result. Thanks again for the help


Background:

I'm trying to install the JUNG package to my system's Java, so I can write object-oriented code using various GUIs (Ecliplse, Dr. Java) using the classes in JUNG. I don't understand how the building/installing process works, and how I can get what I build/install to work on various GUIs and the command line. I'm new to shell and the command line, and mostly have experience using a simple IDE (DrJava, Python IDLE, R GUI) to write and compile object-oriented code.

Answers


To unpack a tar.gz archive you need to do it either in two steps:

gunzip apache-maven-3.0.4.tar.gz 
tar -xf apache-maven-3.0.4.tar

or you might try to do it in a single step:

tar -zxf apache-maven-3.0.4.tar.gz

Two Step Process: 1. Extract the .tar from the .tar.gz using gunzip, and -v for having gunzip print what its doing. gunzip -v apache-maven-3.0.4.tar.gz 2. Extract the .tar file using tar, -x for telling the program to do an extraction, -v for having tar print what its doing, and -f for tar to know that the following file is the archive and appending with sudo so tar has permission to create directories. sudo tar -xvf apache-maven-3.0.4.tar


Need Your Help

Error with the if and else statement

android

I am getting 3 different errors: identifier expected, unexpected token, unknown class: 'score'. These error's are in line 57-69.

getPixel returns a negative value in Android

android image android-image

Friends , am new to android , and am working with a project where i want some Image processing s. And when I tried to use