skip to Main Content

Linux MInt 21, I try to instal MongoDB for like 3 days but apparently I’m not doing something right. I would greatly appreciate it if you could tell me what I am doing wrong :)) I post what i did in the terminal, I removed it and install it again but and that went wrong too

Lenovo-Y520-15IKBM:~$ sudo apt install mongodb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package mongodb is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'mongodb' has no installation candidate

Lenovo-Y520-15IKBM:~$ ^C

Lenovo-Y520-15IKBM:~$ sudo apt-get purge mongo*
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'mongodb-server' for glob 'mongo*'
Note, selecting 'mongodb-dev' for glob 'mongo*'
Note, selecting 'mongodb' for glob 'mongo*'
Note, selecting 'mongoose' for glob 'mongo*'
Package 'mongodb-dev' is not installed, so not removed
Package 'mongodb' is not installed, so not removed
Package 'mongodb-server' is not installed, so not removed
Package 'mongoose' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 63 not upgraded.

Lenovo-Y520-15IKBM:~$ sudo apt install mongodb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package mongodb is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'mongodb' has no installation candidate

Lenovo-Y520-15IKBM:~$ ^C

Lenovo-Y520-15IKBM:~$ sudo apt remove --autoremove mongodb-org
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package mongodb-org
Lenovo-Y520-15IKBM:~$ ^C

Lenovo-Y520-15IKBM:~$ sudo apt install mongodb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package mongodb is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'mongodb' has no installation candi

2

Answers


  1. wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -
    
    echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
    
    sudo apt-get update
    
    
    sudo apt-get install -y mongodb-org
    

    try these commands and you will have mongodb installed on mint

    do not forget to start mongodb sudo systemctl start mongod

    Login or Signup to reply.
  2. A Linux Mint release is always based on a specific Ubuntu version. When you add the MongoDB repositories, you must make sure to reference the correct Ubuntu version. The corresponding variant of Ubuntu is specified in /etc/os-release.

    Here is an example for installing MongoDB-6 in Mint

    curl -sS https://pgp.mongodb.com/server-6.0.asc | sudo gpg --dearmor --output /etc/apt/trusted.gpg.d/mongodb-org-6.0-keyring.gpg
    echo "deb [arch=amd64,arm64] https://repo.mongodb.org/apt/ubuntu $(. /etc/os-release; echo "$UBUNTU_CODENAME")/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
    sudo apt-get update
    sudo apt-get install mongodb-org
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search