0

I'm trying to:

sudo tar xpzf mira-2044-x86_64-Darwin.tgz -C /

I am in the correct directory (my Downloads folder) but I get this error:

./usr/: Can't set user=0/group=0 for usrCan't update time for usr tar: Error exit delayed from previous errors.

What does this error mean in this context?

Hamid Rouhani
  • 2,309
  • 2
  • 31
  • 45
Soluble Snake
  • 73
  • 1
  • 12

1 Answers1

1

Option p of tar means preserve permissions.

tar is attempting to set file permission, ownership and modification time of some existing directories. In MacOS, /usr is owned by root:wheel but the archive has it owned by root:root.

Unfortunately, when running tar as superuser, the default is to preserve permissions. So you cannot turn this off.

Fortunately, k option of tar will skip overwriting existing files or directories. You can tell tar not to overwrite /usr, /usr/local, /usr/local/bin and any directories that you already have.

Modification time is always restored when a file or directory is restored. Option k will already prevent modification time to get updated when it tells tar not to overwrite existing directories/files. It is still better to know that the option m tells tar not to update the modification time of a file/directory.

You should now be able to install miranda by running:

sudo tar xmpkvzf mira-2044-x86_64-Darwin.tgz -C /

That added v (verbose) option is just to let you see what are being extracted.

alvits
  • 6,550
  • 1
  • 28
  • 28
  • Thanks. Can you tell which flag is responsible for the `Can't set user=0/group=0 for usr` part and which one for the `Can't update time for usr`? I suppose I will need to post a second question regarding why the flags `-fvxz` failed with one compressed package image (not for miranda) and succeed with another image of that package just a couple of minor versions later. Not a concern on the bounty. I've got lots of rep to burn. If no one give a more expansive answer it will be yours. – IRTFM May 16 '17 at 20:31
  • @42- Updated my answer for you. – alvits May 16 '17 at 20:57