简体   繁体   中英

Creating Symbolic link fails

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)

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM