3

Is it possible? To install an Arch package on Debian?

Fran b
  • 133
  • Mind if I ask what the package is? There might be a version for Debian in a different repo. – SailorCire Apr 05 '15 at 23:26
  • Rebuild the Debian sources for that software on your machine if a binary package is not available. – Faheem Mitha Apr 05 '15 at 23:40
  • The package is this: http://archlinuxarm.org/packages?search=mongodb. I am trying rebuild the sources, but it is for Raspbian on RPI so building from sources will take long time. – Fran b Apr 06 '15 at 09:43

1 Answers1

3

It's possible, although it's not a good idea to mix package management systems...

An Arch package is an xz-compressed tarball containing the package's files and some meta-data, stored in .PKGINFO, .INSTALL and .MTREE. To extract a package, simply run tar xf on it in a temporary directory; if you then decide you want to install the contents you can move them to / (but please make sure you're not overwriting anything...). The .PKGINFO file will tell you what the dependencies are (depend = lines), and the .INSTALL file will tell you what post-installation tasks you should run, if any.

Unless you absolutely have to, I'd recommend avoiding this approach though; you'd be better off building the package from source if you can. Using binary Arch packages in this way means you're installing software without your distribution's package management system being aware of it, and you're relying on the libraries used being compatible across distributions.

Stephen Kitt
  • 434,908
  • The thing is that I am trying to install mongodb 3.0.1 in a Raspbian (Debian) distribution. But the RPI has an armv7 and Arch is the only one I found who has a package of mongo for this processor type. – Fran b Apr 05 '15 at 22:44
  • I have tried to uncompress the xz but now I get an error such as: mongod: error while loading shared libraries: libsasl2.so.3: cannot open shared object file: No such file or directory – Fran b Apr 05 '15 at 22:46
  • You need to install mongodb's dependencies too... But seriously, try building from source on Raspbian rather than installing the Arch package. – Stephen Kitt Apr 05 '15 at 22:50
  • Building stuff like this on the pi is not impossible but because it is so slow, makes it more problematic, particularly if you don't do much building from source. @Franb You've got past stage 1, unpack the package. The issue with dependencies can be tackled by running ldd on the executable, and then installing whatever doesn't show via a method from here (check the answers to that before you click though to the duplicate!). – goldilocks Apr 06 '15 at 00:29
  • It will take a long time to build on the Raspberry, but that can happen in the background; figuring out all the dependencies may involve a lot of investigation and the result isn't guaranteed... Right from the start, libsasl2.so.3 isn't available in Raspbian yet (http://mirrordirector.raspbian.org/raspbian/pool/main/c/cyrus-sasl2/), so that would need to be installed from Arch too, and so it goes. – Stephen Kitt Apr 06 '15 at 09:27
  • @goldilocks ldd shows 8 dependencies which are not found. But like Stephen Kitt said several dependencies such as libsas12.so.3 aren't available for Raspbian. I am trying compile from sources but gcc 4.8.2+ is required and for Raspbian is gcc 4.8. So first I am compiling gcc 4.9.2. – Fran b Apr 06 '15 at 09:54
  • If you're having to compile gcc yourself it might just be simpler to install Arch... – Stephen Kitt Apr 06 '15 at 10:34
  • Don't try building gcc, honestly -- as Stephen says it would be easier to just back your stuff up and install Arch from scratch. Really. It's not all that different, whatever you were doing with Raspbian I'm sure you can do that way. Anything that beings with, "I'm compiling gcc..." is bound to end in tears. Especially on the pi. – goldilocks Apr 06 '15 at 14:28
  • I have achieved gcc4.9 adding Jessy to Raspbian (wheezy) and upgrading the distro. (8h) Now I will try to build Mongodb from sources. This is a pain... – Fran b Apr 06 '15 at 17:22
  • That's why it's called cutting edge software ;-). Seriously though, if you want to run the latest versions of software on a non-mainstream platform, you should expect some amount of manual work. – Stephen Kitt Apr 06 '15 at 18:05