Rich Freeman on 20 Apr 2018 13:57:52 -0700 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PLUG] Dancing about Architecture |
On Fri, Apr 20, 2018 at 3:57 PM, Ron Mansolino <rmsolino@gmail.com> wrote: > > debian:/opt/splunk# uname -m > x86_64 > debian:/opt/splunk# dpkg --print-architecture > i386 > debian:/opt/splunk# arch > x86_64 > Ok, your kernel appears to be 64-bit, but I assume that the dpkg command you used is telling you that you have a 32-bit userspace installed (I don't really use deb/rpm much). My guess is that you don't have 64-bit glibc/binutils/etc needed to actually run 64-bit binaries. If you run something like readelf -l <path-to-binary> the INTERP header will contain the path to the linker the kernel will use by default, and if that linker isn't installed it won't run. On my distro a 64-bit ELF will point to /lib64/ld-linux-x86-64.so.2. Then, if that linker is present you still need to have any libraries it needs installed (you can identify these with ldd, assuming you have a working linker). That is just going off the top of my head - I didn't try copying a 64-bit ELF to a 32-bit container to see all the things that could go wrong. Honestly, you're probably best off just doing a clean install of a 64-bit distro, either on the host, or maybe in a container/chroot (I'd think you could run a 64-bit container from a 32-bit host userspace as long as the kernel is 64-bit, but I've never tried). Maybe your distro supports layering a 64-bit userspace on top of a 32-bit one but unless it was designed for that I can think of a bunch of things that could go wrong. Different distros have had varying approaches to what goes in /lib vs /lib32 vs /lib64 over the years, and you don't want to overwrite 32-bit stuff with 64-bit stuff or else your 32-bit userspace will stop working. If you got really creative with building stuff yourself you could probably get this all working on the side in an otherwise 32-bit distro (similar to how Gentoo Prefix works), but you'll probably find Linux From Scratch easier to set up. It is typically pretty easy to run 32-bit stuff from a 64-bit distro (most support multilib by default, or at least optionally), but doing the reverse tends to be very painful. -- Rich ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug