4

I am trying to upgrade glibcxx on my CentOS 6.7 machine. I did the steps as given here.

Now, when I do:

strings /opt/google/chrome/lib/libstdc++.so.6 | grep GLIBC

I have GLIBCXX_3.4 to GLIBCXX_3.4.22 listed.

To use this file in my Syantaxnet build, I created a symbolic link:

ln -s /opt/google/chrome/lib/libstdc++.so.6 /usr/lib64/libstdc++.so.6

But I get an error:

ln: creating symbolic link `/usr/lib64/libstdc++.so.6': File exists

EDIT1:

I thought the error was because of the same file names and renamed /opt/google/chrome/lib/libstdc++.so.6 to libstdc++.so.6_new. The command still fails.

Can someone help me figure this out? Also, is this a solution for the error:

/usr/local/bin/bazel: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /usr/local/bin/bazel)
/usr/local/bin/bazel: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /usr/local/bin/bazel)
Employed Russian
  • 199,314
  • 34
  • 295
  • 362
kskp
  • 692
  • 5
  • 11
  • 23
  • Did you try to invert the order of the filenames given to ln -s? – Bruno Negrão Zica Jun 13 '16 at 16:38
  • Yes, I did but it was giving the same error. Anyway, I copied the contents of the /opt/google/chrome/lib/libstdc++.so.6 file into /usr/lib64/libstdc++.so.6 and got it working. Thanks for your time! – kskp Jun 13 '16 at 16:48
  • Looks like it no longer is a symbolic link issue as you seem to have fixed it. The issue you're facing is with GLIBCXX_3.4.XX not being present on your system. Please refer to [this](http://stackoverflow.com/questions/5216399/usr-lib-libstdc-so-6-version-glibcxx-3-4-15-not-found) link for pointers. Hope this helps! – rurtle Jun 13 '16 at 21:38

2 Answers2

10

I thought the error was because of the same file names

The error is telling you that /usr/lib64/libstdc++.so.6 already exists.

If you want to replace it, do this:

ln -sf /opt/google/chrome/lib/libstdc++.so.6 /usr/lib64/libstdc++.so.6

or this:

rm -f /usr/lib64/libstdc++.so.6
ln -s /opt/google/chrome/lib/libstdc++.so.6 /usr/lib64/libstdc++.so.6

and renamed /opt/google/chrome/lib/libstdc++.so.6 to libstdc++.so.6_new

That was exactly the wrong thing to do. You should try to understand what the error is telling you before you try to fix it.

I copied the contents of the /opt/google/chrome/lib/libstdc++.so.6 file into /usr/lib64/libstdc++.so.6 and got it working.

This has a disadvantage: if /opt/google/chrome/lib/libstdc++.so.6 is updated, the copy in /usr/lib64 will not. You should probably do the ln -sf above instead.

Employed Russian
  • 199,314
  • 34
  • 295
  • 362
1

For linux: 1. first check inside the /etc/httpd/sites-enabled/ foder yoursite.conf file is exits or not

  1. if available then copy file first and

  2. then default yoursite.conf delete using rm yourfile.conf

  3. and then use your comand to create link: like: ln -s /etc/httpd/sites-available/yoursites.conf /etc/httpd/sites-enabled/yoursites.conf
Paras Nakum
  • 238
  • 2
  • 8