-1

I built ZeroMQ and Sodium from source and have them installed properly on my development machine, which is just a Pi2. I have one other machine that I want to make sure these gets installed to properly. Is there a proper way to do this other than just copy .a and .so files around?

Kelly Beard
  • 684
  • 1
  • 8
  • 20
  • first, your question doesn't seem to have things to do with `apt`, second, you can have a look at `docker`. it could save you hours. – Jason Hu Aug 25 '15 at 16:41
  • @HuStmpHrrr How is this related to `docker`? Just because you have a hammer, not every problem is a nail. – hek2mgl Aug 25 '15 at 16:43
  • Sure it has something to do with `apt`. The most common OS for use on a raspberry-pi is a Debian derivative, which is a dpkg/apt based distribution. The OP is basically asking, "how can I build my own packages?" (or maybe, "should I build my own packages instead of just copying files?") – larsks Aug 25 '15 at 16:48
  • In any case, I don't think it deserved a down-vote, but whatever. – Kelly Beard Aug 25 '15 at 17:29

1 Answers1

1

So, there are different ways of handling this particular issue.

If you're installing all your built-from-source packages into a dedicated tree (maybe /usr/local, or /opt/mypackages) then simply copying files around is a fine solution, using something like rsync. Particularly since you only have two machines, anything more complicated may not be worth the effort.

If you're trying to install ZeroMQ and Sodium along side system-managed files (in, e.g., /usr/lib and /usr/bin)...don't do that. That is, don't try to mix "things installed by packages" with "things installed from source", because that way lies sadness and doom.

That said, a more manageable way of distributing these files would be to build custom packages and then setting up a local apt repository, so that you can just apt install the packages on your systems. There are various guides out there for doing this if you want to go down this route. It's a good skill to have in general, especially if you ever want to share your tools with someone else (because it makes it easy for them to install any necessary dependencies).

larsks
  • 277,717
  • 41
  • 399
  • 399
  • Yeah, I wouldn't install custom-built things into /usr/bin or /usr/lib. When I run ldd on my executables, it reports paths to /usr/local/lib anyway, so things should get installed there. – Kelly Beard Aug 25 '15 at 17:34