Как я могу установить оба завихрения (в зависимости от libcurl4) и mongodb (в зависимости от libcurl3)?

На Lubuntu 18.04 я установил mongodb следующим https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/#install-mongodb-community-edition

sudo apt install -y mongodb-org mongodb-org-server libcurl3

и теперь хочу установить завихрение

$ sudo apt install curl
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:
 curl : Depends: libcurl4 (= 7.58.0-2ubuntu3.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Я следовал за https://askubuntu.com/a/1051988/1471

можно использовать способный механизм снижения (таким образом, не необходимо для удаления пакетов, которые зависят libcurl4).

apt install -y libcurl4=7.58.0-2ubuntu3
apt install -y curl

Но затем libcurl3 и mongodb были удалены

$ sudo apt install -y libcurl4=7.58.0-2ubuntu3
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  calibre-bin fonts-mathjax geoclue-2.0 iio-sensor-proxy libbrotli1 libchm1 libgeoclue-2-0 libjs-coffeescript libjs-mathjax libpodofo0.9.5 libqt5designer5 libqt5help5
  libqt5positioning5 libqt5sensors5 libqt5sql5 libqt5sql5-sqlite libqt5test5 libqt5webchannel5 libqt5webkit5 libqt5xml5 libwoff1 mongodb-org-mongos mongodb-org-shell
  mongodb-org-tools python-apsw python-asn1crypto python-bs4 python-cffi-backend python-chardet python-cherrypy3 python-cryptography python-cssselect python-cssutils
  python-dateutil python-dbus python-dnspython python-enum34 python-feedparser python-html5-parser python-html5lib python-idna python-ipaddress python-libxml2 python-lxml
  python-markdown python-mechanize python-msgpack python-netifaces python-olefile python-openssl python-pil python-pygments python-pyparsing python-pyqt5 python-pyqt5.qtsvg
  python-pyqt5.qtwebkit python-regex python-repoze.lru python-routes python-simplejson python-sip python-six python-utidylib python-webencodings python-webob python-yaml
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  libcurl3 mongodb-org mongodb-org-server
The following NEW packages will be installed:
  libcurl4
0 upgraded, 1 newly installed, 3 to remove and 0 not upgraded.
Need to get 214 kB of archives.
After this operation, 61.6 MB disk space will be freed.
Get:1 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libcurl4 amd64 7.58.0-2ubuntu3 [214 kB]
Fetched 214 kB in 1s (419 kB/s)
(Reading database ... 235089 files and directories currently installed.)
Removing mongodb-org (4.0.0) ...
Removing mongodb-org-server (4.0.0) ...
Removing libcurl3:amd64 (7.58.0-2ubuntu2) ...
Selecting previously unselected package libcurl4:amd64.
(Reading database ... 235068 files and directories currently installed.)
Preparing to unpack .../libcurl4_7.58.0-2ubuntu3_amd64.deb ...
Unpacking libcurl4:amd64 (7.58.0-2ubuntu3) ...
Setting up libcurl4:amd64 (7.58.0-2ubuntu3) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for man-db (2.8.3-2) ...

Когда я пытался установить mongodb, затем libcurl4 будет удален

$ sudo apt install -y mongodb-org mongodb-org-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  calibre-bin fonts-mathjax geoclue-2.0 iio-sensor-proxy libbrotli1 libchm1 libgeoclue-2-0 libjs-coffeescript libjs-mathjax libpodofo0.9.5 libqt5designer5 libqt5help5
  libqt5positioning5 libqt5sensors5 libqt5sql5 libqt5sql5-sqlite libqt5test5 libqt5webchannel5 libqt5webkit5 libqt5xml5 libwoff1 python-apsw python-asn1crypto python-bs4
  python-cffi-backend python-chardet python-cherrypy3 python-cryptography python-cssselect python-cssutils python-dateutil python-dbus python-dnspython python-enum34
  python-feedparser python-html5-parser python-html5lib python-idna python-ipaddress python-libxml2 python-lxml python-markdown python-mechanize python-msgpack python-netifaces
  python-olefile python-openssl python-pil python-pygments python-pyparsing python-pyqt5 python-pyqt5.qtsvg python-pyqt5.qtwebkit python-regex python-repoze.lru python-routes
  python-simplejson python-sip python-six python-utidylib python-webencodings python-webob python-yaml
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libcurl3
The following packages will be REMOVED:
  libcurl4
The following NEW packages will be installed:
  libcurl3 mongodb-org mongodb-org-server
0 upgraded, 3 newly installed, 1 to remove and 0 not upgraded.
Need to get 15.7 MB of archives.
After this operation, 61.6 MB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 libcurl3 amd64 7.58.0-2ubuntu2 [214 kB]
Get:2 https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0/multiverse amd64 mongodb-org-server amd64 4.0.0 [15.5 MB]
Get:3 https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0/multiverse amd64 mongodb-org amd64 4.0.0 [3,518 B]                                                              
Fetched 15.7 MB in 25s (639 kB/s)                                                                                                                                                
(Reading database ... 235073 files and directories currently installed.)
Removing libcurl4:amd64 (7.58.0-2ubuntu3) ...
Selecting previously unselected package libcurl3:amd64.
(Reading database ... 235068 files and directories currently installed.)
Preparing to unpack .../libcurl3_7.58.0-2ubuntu2_amd64.deb ...
Unpacking libcurl3:amd64 (7.58.0-2ubuntu2) ...
Selecting previously unselected package mongodb-org-server.
Preparing to unpack .../mongodb-org-server_4.0.0_amd64.deb ...
Unpacking mongodb-org-server (4.0.0) ...
Selecting previously unselected package mongodb-org.
Preparing to unpack .../mongodb-org_4.0.0_amd64.deb ...
Unpacking mongodb-org (4.0.0) ...
Setting up libcurl3:amd64 (7.58.0-2ubuntu2) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for man-db (2.8.3-2) ...
Setting up mongodb-org-server (4.0.0) ...
Setting up mongodb-org (4.0.0) ...

Как я установлю и завихрение и mongodb

1
задан 7 August 2018 в 00:02

1 ответ

Другой способ решить проблемы зависимостей библиотек состоит в том, чтобы использовать контейнер докера.

Например, в этом случае, после того как докер-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 

Таким образом Вы не зависите от своих системных зависимостей.

Надеюсь, это поможет.

0
ответ дан 7 December 2019 в 23:55

Другие вопросы по тегам:

Похожие вопросы: