Solve the error of starting MongoDB: error while loading shared libraries: libstdc++.so.6:cannot open shared object file:

Solve the error of starting MongoDB: error while loading shared libraries: libstdc++.so.6:cannot open shared object file:

When starting MongoDB, the prompt is:

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

[root@SnsWeb ~]# /usr/local/mongodb/bin/mongod --dbpath=/usr/local/mongodb/data --logpath /usr/local/mongodb/logs/mongodb.log --fork
/usr/local/mongodb/bin/mongod: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
[root@SnsWeb ~]#

Error reason: missing libstdc++.so.6 runtime library

Solution: Install the libstdc++.so.6 runtime library

1. Execute commands

yum whatprovides libstdc++.so.6

Then it will prompt which installation package has this library file, as follows:

[root@SnsWeb ~]# yum whatprovides libstdc++.so.6
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
libstdc++-4.4.7-11.el6.i686 : GNU Standard C++ Library
Repo: base
Matched from:
Other : libstdc++.so.6

2. Then execute

yum -y install libstdc++-4.4.7-11.el6.i686

It is very simple. When there are various problems with the system or software at work, don’t rush to ask Baidu. Try to read the error message and solve the related problems yourself according to the error message. If it is in English, it can also improve your English reading level.

You may also be interested in:
  • C++ implementation of GrayToColorFromOther based on grayscale image coloring
  • Testing issues of std::move, std::forward, left and right value references, and move constructors in C++11
  • Example sharing cmake compiles a simple c++ project (demo)
  • Detailed explanation of the C++ gmock unit testing framework
  • Introduction to value category and move semantics in C++11
  • C++ move() function case study

<<:  Detailed explanation of Angular component life cycle (I)

>>:  Solution - BASH: /HOME/JAVA/JDK1.8.0_221/BIN/JAVA: Insufficient permissions

Recommend

Vue uses WebSocket to simulate the chat function

The effect shows that two browsers simulate each ...

Linux general java program startup script code example

Although the frequency of starting the shell is v...

Implementation of iview permission management

Table of contents iview-admin2.0 built-in permiss...

Vue based on Element button permission implementation solution

Background requirements: The ERP system needs to ...

CentOS 7 switching boot kernel and switching boot mode explanation

centos7 switch boot kernel Note: If necessary, it...

Summary of MySQL common functions

Preface: The MySQL database provides a wide range...

Organize the common knowledge points of CocosCreator

Table of contents 1. Scene loading 2. Find Node 1...

Fixed table width table-layout: fixed

In order to make the table fill the screen (the re...

Summary of H5 wake-up APP implementation methods and points for attention

Table of contents Preface Jump to APP method URL ...

A simple and in-depth study of async and await in JavaScript

Table of contents 1. Introduction 2. Detailed exp...

Sample code for a simple seamless scrolling carousel implemented with native Js

There are many loopholes in the simple seamless s...

Solution to the blank page after vue.js packaged project

I believe that many partners who have just come i...