Ubuntu Linux

Ubuntu 22.04 LTS 에 Mongo DB 설치하기

SmartPro 2023. 5. 22. 11:51

Ubuntu 22.04 LTS에 몽고DB를 설치할 때 다음과 같은 에러가 발생하여 설치가 안되는 경우가 있다.

 

mongodb-org-mongos : Depends: libssl1.1 (>= 1.1.1) but it si not installable.

mongodb-org-server : Depends: libssl1.1 (>= 1.1.1) but it si not installable.

E: Unable to correct problems, you have held broken packages.

 

해결방법은 이전버전의 몽고DB를 설치하거나 libssl1.1을 설치하면 된다.

이전 버전을 설치하는 것은 몽고DB 홈페이지에서 찾아보면 있으니

libssl1.1 설치방법만 간단하게 소개합니다.

 

1. ubuntu@server: $ sudo apt install dirmngr gnupg apt-transport-https ca-certificates software-properties-common

2. ubuntu@server: $ echo "deb http://security.ubuntu.com/ubuntu impish-security main" | sudo tee /etc/apt/sources.list.d/impish-security.list

3. ubuntu@server: $ sudo wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb  

4. ubuntu@server: $ sudo dpkg -i libssl1.1_1.1.1f-lubuntu2_amd64.deb

5. ubuntu@server: $ sudo apt update

6. ubuntu@server: $ sudo apt install libssl1.1

 

이렇게 하면 설치가 된다.