重庆思庄Oracle、Redhat认证学习论坛
标题: 初次安装MongoDB数据库可能会遇到libnetsnmpagent.so.35错误。 [打印本页]
作者: jiawang 时间: 2023-11-26 13:21
标题: 初次安装MongoDB数据库可能会遇到libnetsnmpagent.so.35错误。
启动服务报错:
[root@bogon ~]# mongod --config /etc/mongodb.conf
mongod: error while loading shared libraries: libnetsnmpmibs.so.35: cannot open shared object file: No such file or directory
解决方案:
该error 是因为未装net-snmp
有外网的Linux服务器可直接使用:yum install net-snmp进行安装。
[root@bogon yum.repos.d]# {
> echo "[BASEOS]"
> echo "name=BASEOS"
> echo "baseurl=file:///mnt/BaseOS"
> echo "enabled=1"
> echo "gpgcheck=0"
> echo "[APPSTREAM]"
> echo "name=APPSTREAM"
> echo "baseurl=file:///mnt/AppStream"
> echo "enabled=1"
> echo "gpgcheck=0"
> } >/etc/yum.repos.d/mnt.repo
[root@bogon yum.repos.d]#
[root@bogon yum.repos.d]#
[root@bogon yum.repos.d]#
[root@bogon yum.repos.d]# ll
total 4
-rw-r--r--. 1 root root 147 Nov 9 10:51 mnt.repo
drwxr-xr-x. 2 root root 25 Nov 9 10:40 redhat
[root@bogon yum.repos.d]# more mnt.repo
[BASEOS]
name=BASEOS
baseurl=file:///mnt/BaseOS
enabled=1
gpgcheck=0
[APPSTREAM]
name=APPSTREAM
baseurl=file:///mnt/AppStream
enabled=1
gpgcheck=0
[root@bogon yum.repos.d]#
[root@bogon yum.repos.d]# yum clean all
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
0 files removed
[root@bogon yum.repos.d]# yum makecache
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
BASEOS 155 MB/s | 2.3 MB 00:00
APPSTREAM 29 MB/s | 5.8 MB 00:00
Metadata cache created.
[root@bogon yum.repos.d]#
[root@bogon yum.repos.d]#
[root@bogon yum.repos.d]#
[root@bogon yum.repos.d]# ll
total 8
-rw-r--r--. 1 root root 147 Nov 9 10:51 mnt.repo
drwxr-xr-x. 2 root root 25 Nov 9 10:40 redhat
-rw-r--r--. 1 root root 358 Nov 9 10:51 redhat.repo
[root@bogon yum.repos.d]#
[root@bogon yum.repos.d]#
[root@bogon yum.repos.d]# yum install net-snmp
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Last metadata expiration check: 0:00:29 ago on Thu 09 Nov 2023 10:51:31 AM CST.
Dependencies resolved.
===================================================================================================================================================================
Package Architecture Version Repository Size
===================================================================================================================================================================
Installing:
net-snmp x86_64 1:5.8-14.el8 APPSTREAM 353 k
Installing dependencies:
lm_sensors-libs x86_64 3.4.0-21.20180522git70f7e08.el8 BASEOS 59 k
mariadb-connector-c x86_64 3.0.7-1.el8 APPSTREAM 148 k
mariadb-connector-c-config noarch 3.0.7-1.el8 APPSTREAM 13 k
net-snmp-agent-libs x86_64 1:5.8-14.el8 APPSTREAM 747 k
Transaction Summary
===================================================================================================================================================================
Install 5 Packages
Total size: 1.3 M
Installed size: 3.5 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Running scriptlet: mariadb-connector-c-3.0.7-1.el8.x86_64 1/1
Preparing : 1/1
Installing : lm_sensors-libs-3.4.0-21.20180522git70f7e08.el8.x86_64 1/5
Running scriptlet: lm_sensors-libs-3.4.0-21.20180522git70f7e08.el8.x86_64 1/5
Installing : mariadb-connector-c-config-3.0.7-1.el8.noarch 2/5
Installing : mariadb-connector-c-3.0.7-1.el8.x86_64 3/5
Installing : net-snmp-agent-libs-1:5.8-14.el8.x86_64 4/5
Installing : net-snmp-1:5.8-14.el8.x86_64 5/5
Running scriptlet: net-snmp-1:5.8-14.el8.x86_64 5/5
Verifying : lm_sensors-libs-3.4.0-21.20180522git70f7e08.el8.x86_64 1/5
Verifying : mariadb-connector-c-3.0.7-1.el8.x86_64 2/5
Verifying : mariadb-connector-c-config-3.0.7-1.el8.noarch 3/5
Verifying : net-snmp-1:5.8-14.el8.x86_64 4/5
Verifying : net-snmp-agent-libs-1:5.8-14.el8.x86_64 5/5
Installed products updated.
Installed:
lm_sensors-libs-3.4.0-21.20180522git70f7e08.el8.x86_64 mariadb-connector-c-3.0.7-1.el8.x86_64 mariadb-connector-c-config-3.0.7-1.el8.noarch
net-snmp-1:5.8-14.el8.x86_64 net-snmp-agent-libs-1:5.8-14.el8.x86_64
Complete!
欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) |
Powered by Discuz! X3.2 |