3

I am working on a CentOS 7 workstation. I had installed Rstudio and it was working fine until recently. But now, if I try to launch it at http://localhost:8787/ I get an error that says Unable to connect to service

I checked if R is working properly in terminal and I got following error.

/usr/lib64/R/bin/exec/R: error while loading shared libraries: /lib/libgcc_s.so.1: file too short

If I try to install R again using following command, sudo yum install R -y I get following reply

Package R-3.5.2-2.el7.x86_64 already installed and latest version
Nothing to do

What do I have to do?

  • I know this message and it is typically true: The so is truncanted or empty because of some prior problem. What does objdump /lib/libgcc_s.so.1 say (if you have the GNU tools installed)? – Philippos Jun 7 at 8:28
  • I don't get the output. It asks for more details. It says At least one of the following switches must be given and then there are options --archive-headers --file-headers etc. And the output is blank if I select these two options. – Satyajeet Khare Jun 7 at 8:32
  • You are right. Just choose some random option like objdump -a – Philippos Jun 7 at 8:35
  • I updated my post a bit late. There is no output with any option I try. – Satyajeet Khare Jun 7 at 8:38
  • 1
    Looks like an empty file. 0 /lib/libgcc_s.so.1 – Satyajeet Khare Jun 7 at 9:06
2

You have a damaged .so.

In general, you issue the following command to find the package it belongs to:

yum provides \*/<so_file>

In your case:

$ yum provides \*/libgcc_s.so.1
[...]
libgcc-4.4.6-4.el6.i686 : GCC version 4.4 shared support library
Repo : base
Matched from:
Filename : /lib/libgcc_s.so.1
[...]

In this case, we want libgcc-4.4.6-4.el6.i686, you will get another version.

You need to reinstall that package.

yum reinstall libgcc-<version>.i686
  • I tried doing that but got an error. Loaded plugins: fastestmirror, langpacks No Match for argument: libgcc-4.4.6-4.el6.i686 Loading mirror speeds from cached hostfile * base: mirror.nbrc.ac.in * epel: kartolo.sby.datautama.net.id * extras: mirror.nbrc.ac.in * updates: mirror.nbrc.ac.in Error: Nothing to do . No package libgcc-4.4.6-4.el6.i686 available. – Satyajeet Khare Jun 7 at 9:07
  • Yeah, hm, I should have removed version info! Will edit my answer ... I do not have CentOS 7 here ... ;-) What does yum provides \*/libgcc_s.so.1 report for /lib/libgcc_s.so.1 ? – thecarpy Jun 7 at 9:38
  • Multiple lines but mostly this libgcc-4.8.5-36.el7_6.2.i686 : GCC version 4.8 shared support library – Satyajeet Khare Jun 7 at 11:44
  • Oh, I see! Thanks :) – Satyajeet Khare Jun 7 at 11:56

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.