在linux安装nodejs,配置好环境变量后,node -v出错:

bash: /usr/local/node/bin/node: /lib/ld-linux.so.2: bad ELF interpreter: 没有那个文件或目录

按照提示的意思是解释器出了问题,度娘了一下,应该这样能解决:

##切忌不要输入此命令,我自己给自己挖的坑,后面就能看到

sudo yum install glibc.i686

试一下:

node -v

报错:

 error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

解决方式:

https://blog.csdn.net/wwwyuanliang10000/article/details/38661179

错误: Multilib version problems found. This often means that the root
      cause is something else and multilib version checking is just
      pointing out that there is a problem. Eg.:
      
        1. You have an upgrade for libstdc++ which is missing some
           dependency that another package requires. Yum is trying to
           solve this by installing an older version of libstdc++ of the
           different architecture. If you exclude the bad architecture
           yum will tell you what the root cause is (which package
           requires what). You can try redoing the upgrade with
           –exclude libstdc++.otherarch … this should give you an error
           message showing the root cause of the problem.
      
        2. You have multiple architectures of libstdc++ installed, but
           yum can only see an upgrade for one of those architectures.
           If you don’t want/need both architectures anymore then you
           can remove the one with the missing update and everything
           will work.
      
        3. You have duplicate versions of libstdc++ installed already.
           You can use “yum check” to get yum show these errors.
      
      …you can also use –setopt=protected_multilib=false to remove
      this checking, however this is almost never the correct thing to
      do as something else is very likely to go wrong (often causing
      much more problems).
      
      保护多库版本:libstdc++-4.8.5-36.el7.i686 != libstdc++-4.8.5-11.el7.x86_64

多版本问题,需要关闭保护

解决方式:

yum whatprovides libstdc++.so.6

 yum install –setopt=protected_multilib=false libstdc++-4.8.5-36.el7.i686
报错:

Transaction check error:
  file /usr/share/gcc-4.8.2/python/libstdcxx/v6/printers.pyc from install of libstdc++-4.8.5-36.el7.i686 conflicts with file from package libstdc++-4.8.5-11.el7.x86_64
  file /usr/share/gcc-4.8.2/python/libstdcxx/v6/printers.pyo from install of libstdc++-4.8.5-36.el7.i686 conflicts with file from package libstdc++-4.8.5-11.el7.x86_64
 

导致该问题原因是因为版本冲突了,因为之前使用了sudo yum install glibc.i686安装了一个版本,现在又要安装另外一个版本

解决方式:

yum update libstdc++-4.8.5-11.el7.x86_64

yum install –setopt=protected_multilib=false libstdc++-4.8.5-36.el7.i686
终于解决
——————— 
作者:喝粥也会胖的唐僧 
来源:CSDN 
原文:https://blog.csdn.net/zhou_438/article/details/85836450 
版权声明:本文为博主原创文章,转载请附上博文链接!