How do I tell what platform a package was built for?

0

I am trying to upgrade certain packages on my system to 64bit. How do I tell whether a particular package is built for 32bit or 64bit?

The package name has an x86 after it which usually indicates it's 32bit, but I don't think this is definitive. ie. I know I have some packages that are 64bit but have a x86 suffix. How can I determine for sure its platform type?

Thank you

barrrista

Posted 2012-02-23T20:14:48.597

Reputation: 1 519

1No 64 anywhere in the package name when built for 64 bit, e.g. x86_64? – Daniel Beck – 2012-02-23T20:15:56.970

Which package format is it? – user1686 – 2012-02-23T21:09:37.937

@Daniel: the package names are x86, and I don't see any x86_64. – barrrista – 2012-02-23T21:15:31.843

1@hhsue: In that case, it's almost 100% to be 32-bit. – user1686 – 2012-02-23T21:19:02.857

@grawity: RPM though several of the packages are not listed in the RPM database. – barrrista – 2012-02-23T22:23:09.013

Answers

0

The package should be x86 for generic 32 bit Intel compatible processor, or sometimes it will have i386, i586, i686 if it was compiled for that processor level (e.g. compiled for 686 means it may use some opcodes that would fail on a true 80386).

If it has x86_64 then it was compiled for 64 bit, AMD64 or EM64T, however you want to call it.

If you don't think the package name is accurate, you can either query the package with your package manager tools (you don't say which package manager you're using). You could also unarchive the package and use file on executables to see what bitsize they are. For example, RPMs are special cpio files with metadata; you can unarchive them with a mix of rpm2cpio and cpio.

Rich Homolka

Posted 2012-02-23T20:14:48.597

Reputation: 27 121

1rpm2cpio foo.rpm | cpio -idmv, for example. – jjlin – 2012-02-23T21:44:48.780