tar: Cannot create symlink : File exists

4

1

I backup lots of gigebytes files in to myproject.tar.gz, and compress success without errors. Now, I want to decompress all to an folder "myprojects".

adan@adan-Latitude-D630:~$ tar zxf myproject.tar.gz  -C myprojects/
tar: myproject/androidsource/prebuilts/ndk/current: Cannot create symlink to ‘8’: File exists
tar: myproject/androidsource/uboot/include/configs/amlogic:  Cannot open : File exists
tar: Exiting with failure status due to previous errors

It is my first decompression, and the folder is empty, I am sure the file is not exist in "myprojects" folder when decompressing, why are these errors happened? how to uncompress my backup file without errors? Could I ingnore it without any harmful?

thanks for your help.

gladman

Posted 2014-04-21T07:00:07.570

Reputation: 141

Are you possibly untarring it to a filesystem that does not support symbolic links? – Raúl Salinas-Monteagudo – 2014-10-24T08:16:22.483

Sounds like the tar file has duplicate entries for some names. Show how you created the file. – Barmar – 2014-04-26T22:10:30.490

I create the tar file using gnome package manager. right click the target folder, and compressed it. – gladman – 2014-04-29T08:44:45.170

Answers

2

The solution I found for this was to not use the Gnome package manager, but rather to use the terminal command:

tar -czf myproject.tar.gz myoriginalproject

You should then be able to unpack the tarball as you do in your question but without those pesky errors.

This seems to be an issue with the Gnome package manager. When I created a tarball with it, then inspected it with the archive manager, it seemed that the symlinks had actually been populated with the contents of the target directory, and the target directory was empty.

Hope this helps.

Chris

Posted 2014-04-21T07:00:07.570

Reputation: 21