1

Some years ago I switched several 32bit Linode servers to the 64bit kernel (as per instructions here https://www.linode.com/docs/platform/disk-images/switch-to-a-64-bit-linux-kernel). Most of them have been operating as 64bit since then. Output of commands show the following on these 64bits:

[root@host1 ~]# getconf LONG_BIT
64
[root@host1 ~]# uname -a
Linux host1.mydomain.co.uk 4.6.5-x86_64-linode71 #2 SMP Fri Jul 29 16:16:25 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux

But a couple of servers which are also on the 64bit kernel show 32 from getconf:

[root@host2 ~]# getconf LONG_BIT
32
[root@host2 ~]# uname -a
Linux host2.mydomain.co.uk 4.9.15-x86_64-linode81 #1 SMP Fri Mar 17 09:47:36 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux

Linode suggest maybe a package has changed it at some point.

The problem is its preventing me installing some packages via yum I think. On the 64bit servers I can install PHP7 for example, but on the 32bit I cannot install the necessary repos to install PHP7, they don't exist for 32bit.

The servers should be very similar. I set them up years ago as 32bit, changed them all to 64bit kernels years ago, but only recently realise most of my servers can have PHP7, but only a couple can't, due to them reporting as 32.

Does anyone know why this could happen? Can the output of getconf be changed?

32bit server getconf directory files:

[root@host2 ~]# ls -l /usr/libexec/getconf
total 96
lrwxrwxrwx 1 root root    20 Jun 11  2016 default -> POSIX_V6_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 May 10  2016 POSIX_V6_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 May 10  2016 POSIX_V6_ILP32_OFFBIG
-rwxr-xr-x 4 root root 23740 May 10  2016 POSIX_V7_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 May 10  2016 POSIX_V7_ILP32_OFFBIG

64bit server getconf directory files:

[root@host1 ~]# ls -l /usr/libexec/getconf
total 48
lrwxrwxrwx 1 root root    19 Apr 25 10:56 default -> POSIX_V6_LP64_OFF64
-rwxr-xr-x 2 root root 22808 Apr 11 16:49 POSIX_V6_LP64_OFF64
-rwxr-xr-x 2 root root 22808 Apr 11 16:49 POSIX_V7_LP64_OFF64
  • The output of getconf isn't related to the kernel. See this answer about 32-bit vs 64-bit. getconf should be consistent with your default C compilation target, which is usually the same architecture as the system binaries but can be different. What distribution is this? – Gilles 'SO- stop being evil' Apr 27 '17 at 0:39
  • Centos 6. I read that yum would use getconf for its updates which explains why it wont install 64bit packages. Doesn't explain why my other servers of the same distro and kernel etc show 64bit (and yum installs the packages I need OK). – Laurence Cope May 1 '17 at 11:30

Your Answer

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

Browse other questions tagged or ask your own question.