1

I'm trying to install multisim 14.3 using wine, and had to edit one of the packages, specifically the instructions file inside data.tar.gz.

I'm having trouble adding the files back running the command

ar -r --output=../ni-msvcrt-2015_14.1.5.49152-0+f0_windows_al.nipkg ./*

It returns the following:

ar: ./control.tar.gz: file format not recognized

I'm aware that ar isn't supposed to deal with compressed files, but since the compressed files are already in the package, I would believe there is a way to do it.

ar --version returns GNU ar (GNU Binutils) 2.45.0 and I'm using Arch linux.

1 Answer 1

5

From the manual of GNU ar:

--output DIRNAME
The --output option can be used to specify a path to a directory into which archive members should be extracted. If this option is not specified then the current directory will be used.

Note - although the presence of this option does imply a ‘x’ extraction operation that option must still be included on the command line.

That option (an extension over the standard) only makes sense in archive extraction mode, and is not how you specify the archive to store files in creation/insertion mode.

It's the first non-option argument that is taken as the archive name, so in your command the first one resulting from the expansion of ./* which happens to be ./control.tar.gz and ar complains it can't add the remaining ones to that file as it's not an ar archive.

Instead, you want:

ar -r ../ni-msvcrt-2015_14.1.5.49152-0+f0_windows_al.nipkg ./*

Or if you already know the tar CLI syntax and would rather not have to learn yet another archiver CLI syntax, use libarchive's bsdtar:

bsdtar --format ar -cf ../ni-msvcrt-2015_14.1.5.49152-0+f0_windows_al.nipkg ./*

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.