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

  • Mind if I ask what the package is? There might be a version for Debian in a different repo. – SailorCire Apr 5 '15 at 23:26
  • Rebuild the Debian sources for that software on your machine if a binary package is not available. – Faheem Mitha Apr 5 '15 at 23:40
  • The package is this: 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 6 '15 at 9:43

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.

  • 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 5 '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 5 '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 5 '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 6 '15 at 0: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 (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 6 '15 at 9:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.