Debian10升级到libcurl4,因此mongo服务器的安装失败。是否可以使用libcurl4运行单神?
在执行mongod二进制文件时,我得到/usr/bin/mongod: /usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3‘not (/usr/bin/mongod需要)。
在尝试安装libcurl3时,我得到了libcurl4替换它的消息。
发布于 2019-07-09 11:45:23
这个问题已经过时了。现在有一个可用的Debian10版本。
(旧答案)现在只需使用为Ubuntu18.4构建的版本,访问https://www.mongodb.com/try/download/community并下载Ubuntu18.4版本。Ubuntu基于Debian测试,因此不应该出现使用该版本的问题。Mongo可能很快就会更新他们的Debian版本。然后您可以安装Debian10
在同一链接中已有Debian 10版本可供使用。
下载后,您可以使用此命令安装(只要您的shell与下载的包位于同一个文件夹中):
sudo dpkg -i mongodb-org-server*.deb发布于 2019-07-18 08:43:47
解决库依赖问题的另一种方法是使用docker容器。
例如,在这种情况下,一旦安装了docker-ce,您就可以运行如下内容:
docker run -d --name mongo-4.0.9 -p 127.0.0.1:27017:27017 --restart unless-stopped -v /var/lib/mongodb:/data/db mongo:4.0.9 这样,您就不依赖于系统依赖项。
希望这能有所帮助。
发布于 2021-07-21 14:20:27
2021-07年,我在Debian 10 (Buster)上收到了同样的问题,当时我正在跟踪官方的MongoDB文档,以便在一台新Debian机器上设置一个旧的Mongodb版本(4.0)。
遵循这些步骤之后,您将同时安装licurl3和libcurl4。到目前为止,我还没有发现任何破坏的依赖关系。
root@mongo21-1 ➜ sources.list.d cat <<EOF > /etc/apt/sources.list.d/mongodb_org_deb.list
deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main
EOF
root@mongo21-1 ➜ sources.list.d apt update
root@mongo21-1 ➜ sources.list.d apt install -y mongodb-org-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mongodb-org-server : Depends: libcurl3 (>= 7.16.2) but it is not installable
E: Unable to correct problems, you have held broken packages.所以问题是Mongo需要明确的libcurl3,但是在最新的Debian 10版本中不再支持它。但是,您可以执行以下操作:
root@ecollect-mongo21-1 ➜ sources.list.d cat <<EOF > /etc/apt/sources.list.d/oldstable.list
deb http://security.debian.org/ oldstable/updates main
EOF
root@mongo21-1 ➜ sources.list.d apt update
root@mongo21-1 ➜ sources.list.d apt install -y libcurl3/oldstable
root@mongo21-1 ➜ sources.list.d apt install -y mongodb-org-server就像一种魅力!
编辑:下面是一些可自动化的任务:
---
- name: Ensure deb keyring for mongodb
apt_key:
state: present
url: https://www.mongodb.org/static/pgp/server-4.0.asc
- name: Ensure mongodb deb source
apt_repository:
filename: /etc/apt/sources.list.d/repo-mongodb_org-debian-apt
state: present
repo: "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main"
- name: Ensure libcurl3 source
apt_repository:
filename: /etc/apt/sources.list.d/oldstable.list
state: present
repo: "deb http://security.debian.org/ oldstable/updates main"
- name: Install packages - mongodb-org-server
apt:
name: mongodb-org-server
state: present
- name: Install packages - mongodb-org-shell
apt:
name: mongodb-org-shell
state: present
- name: Install packages - mongodb-org-tools
apt:
name: mongodb-org-tools
state: presenthttps://stackoverflow.com/questions/56942214
复制相似问题