1

I was working on setting up a machine with centos 7 and somewhere along the line it seems I messed up and now most commands output some ELF error:

[***** ~]$ python python: �����: ELF: zR: Error 1227246965

[***** ~]$ ls ls: : ELF: zR: Error 18446744071987891573

Strangely some functions work putting sudo in front.

[***** ~]$ yum install gcc
/usr/bin/python: : ELF: zR: Error 18446744071568268661

[***** ~]$ sudo yum install gcc
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
....

Any idea how I can go about troubleshooting this issue? Thank you!

masotann
  • 901
  • 10
  • 29

1 Answers1

1

Google search points to this similar problem.

What you probably did is install a copy of libc.so.6 that is incompatible with your system loader (/lib64/ld-linux-x86-64.so.2) somewhere on your LD_LIBRARY_PATH.

The reason commands work under sudo is likely that they ignore LD_LIBRARY_PATH.

You can unset LD_LIBRARY_PATH and check whether the problem goes away.

Installing a copy of libc.so.6 incorrectly is a very easy way to render your system un-bootable.

See this answer if you need to have multiple GLIBC instances.

Employed Russian
  • 199,314
  • 34
  • 295
  • 362
  • thank you, your analysis was correct! I installed brew and `LD_LIBRARY_PATH` had these paths: /***/.linuxbrew/lib64:/***/.linuxbrew/lib. Unsetting this helped the problem go away. Thanks again! – masotann Jun 04 '18 at 16:22