E : mongodb-org 패키지를 찾을 수 없습니다.
mongodb를 다운로드하려고하는데이 링크 의 단계를 따르고 있습니다.
그러나 단계에 도달하면 :
sudo apt-get install -y mongodb-org
다음과 같은 오류가 발생합니다.
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mongodb-org //This is the error
왜 이런 일이 발생하고 해결 방법이 있습니까?
나는 같은 문제에 직면했지만 패키지 파일 섹션 명령을 변경하여 수정했습니다. 내가 따라 간 전체 단계는 다음과 같습니다.
먼저 다음 명령을 시도하십시오. sudo apt-get install -y mongodb
이것은 Ubuntu에서 제공하는 비공식 mongodb 패키지이며 MongoDB에서 유지 관리하지 않으며 MongoDB의 공식적으로 지원되는 패키지와 충돌합니다.
위의 명령이 작동하지 않으면 다음 절차 중 하나를 사용하여 문제를 해결할 수 있습니다.
#Step 1: Import the MongoDB public key
#In Ubuntu 18.*+, you may get invalid signatures. --recv value may need to be updated to EA312927.
#See here for more details on the invalid signature issue: [https://stackoverflow.com/questions/34733340/mongodb-gpg-invalid-signatures][1]
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
#Step 2: Generate a file with the MongoDB repository url
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
#Step 3: Refresh the local database with the packages
sudo apt-get update
#Step 4: Install the last stable MongoDB version and all the necessary packages on our system
sudo apt-get install mongodb-org
#Or
# The unofficial mongodb package provided by Ubuntu is not maintained by MongoDB and conflict with MongoDB’s offically supported packages. Use the official MongoDB mongodb-org packages, which are kept up-to-date with the most recent major and minor MongoDB releases.
sudo apt-get install -y mongodb
이것이 당신에게도 효과가 있기를 바랍니다. 이 MongoDB를 따를 수 있습니다.
업데이트 위의 지침은 mongodb 2.6 버전을 설치합니다. 최신 버전을 설치하려면 Uubuntu 12.04
위의 내용을 교체 step 2
하고 대신 다음 지침을 따르십시오.
#Step 2: Generate a file with the MongoDB repository url
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb.list
사용하는 경우 Ubuntu 14.04
위의 대신 아래 단계를 사용하십시오.step 2
#Step 2: Generate a file with the MongoDB repository url
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
여기서 진정한 문제는 32 비트 시스템을 사용 하는 경우 일 수 있습니다 . MongoDB 3.X는 32 비트 시스템에서 사용하도록 만들어지지 않았으므로 32 비트에 대한 리포지토리가 비어 있습니다 (따라서 찾을 수없는 이유). 기본 2.X Ubuntu 패키지를 설치하는 것이 가장 좋은 방법은 다음과 같습니다.
sudo apt-get install -y mongodb
그럼에도 불구하고 최신 버전의 Mongo를 얻으려는 경우 다른 해결 방법 :
https://www.mongodb.org/downloads 로 이동 하여 드롭 다운을 사용하여 "Linux 32 비트 레거시"를 선택할 수 있습니다.
But it comes with severe limitations...
This 32-bit legacy distribution does not include SSL encryption and is limited to around 2GB of data. In general you should use the 64 bit builds. See here for more information.
Try without '-org':
sudo apt-get install -y mongodb
Worked for me!
I'm running Ubuntu 14.04; and apt still couldn't find package; I tried all the answers above and more. The URL that worked for me is this:
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
Source: http://www.liquidweb.com/kb/how-to-install-mongodb-on-ubuntu-14-04/
All steps are correct just change the Step 4 as below
- Step 4: Install the last stable MongoDB version and all the necessary packages on our system
Command: sudo apt-get install mongodb
It has worked for me.
If you are currently using the MongoDB 3.3 Repository (as officially currently suggested by MongoDB website) you should take in consideration that the package name used for version 3.3 is:
mongodb-org-unstable
Then the proper installation command for this version will be:
sudo apt-get install -y mongodb-org-unstable
Considering this, I will rather suggest to use the current latest stable version (v3.2) until the v3.3 becomes stable, the commands to install it are listed below:
Download the v3.2 Repository key:
wget -qO - https://www.mongodb.org/static/pgp/server-3.2.asc | sudo apt-key add -
If you work with Ubuntu 12.04 or Mint 13 add the following repository:
echo "deb http://repo.mongodb.org/apt/ubuntu precise/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
If you work with Ubuntu 14.04 or Mint 17 add the following repository:
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
If you work with Ubuntu 16.04 or Mint 18 add the following repository:
echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
Update the package list and install mongo:
sudo apt-get update
sudo apt-get install -y mongodb-org
The currently accepted answer works, but will install an outdated version of Mongo.
The Mongo documentation states that: MongoDB only provides packages for Ubuntu 12.04 LTS (Precise Pangolin) and 14.04 LTS (Trusty Tahr). However, These packages may work with other Ubuntu releases.
So, to get the lastest stable Mongo (3.0
), use this (the different step is the second one):
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb.list
apt-get update
apt-get install mongodb-org
Hope this helps.
I would like to add that as a previous step, you must check your GNU/Linux Distro Release, which will construct the Repo list url. For me, as I am using this:
DISTRIB_CODENAME=rafaela
DISTRIB_DESCRIPTION="Linux Mint 17.2 Rafaela"
NAME="Ubuntu"
VERSION="14.04.2 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.2 LTS"
The original 2nd step:
"Create a list file for MongoDB": "echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list"
Didn't work as intended because it generated an incorrect Repo url. Basically, it put the distribution codename "rafaela" within the url repo which doesn't exist. You can check the Repo url at your package manager under Software Sources, Additional Repositories.
What I did was to browse the site:
http://repo.mongodb.org/apt/ubuntu/dists/
And I found out that for Ubuntu, "trusty" and "precise" are the only web folders available, not "rafaela".
Solution: Open as root the file 'mongodb-org-3.1.list' or 'mongodb.list' and replace "rafaela" or your release version for the corresponding version (for me it was: "trusty"), save the changes and continue with next steps. Also, your package manager can let you change easily the repo url as well.
Hope it works for you.! ---
You first need to add the package database and add the PGP key.
Run the following.
#add pgp key
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
#add package file
echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
#update package list
sudo apt-get update
#install mongo
sudo apt-get install -y mongodb-org
I had the same issue in 14.04, but I fixed it by these steps:
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
- echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb- org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
- sudo apt-get update
- sudo apt-get install -y mongodb
It worked like charm :)
sudo apt-get install -y mongodb
it works for 32-bit ubuntu, try it.best of luck.
This worked on Ubuntu 17.04
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
sudo apt-get update
sudo apt-get install -y mongodb-org
If you see a failure like:
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-tools_3.6.2_amd64.deb (--unpack):
trying to overwrite '/usr/bin/bsondump', which is also in package mongo-tools 3.2.11-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Then run this command:
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" |
sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
and
sudo apt update
sudo apt install mongodb-org
References:
I had the same problems on Ubuntu 16.04 when I followed the steps posted on the official document.
Then I remove the text "[ arch=amd64,arm64 ]" in step2 and it works for me.
echo "deb https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
apt-get install -y mongodb-org
참고URL : https://stackoverflow.com/questions/28945921/e-unable-to-locate-package-mongodb-org
'program story' 카테고리의 다른 글
execCommand에서 '일반 텍스트로 붙여 넣기'에 대한 Javascript 트릭 (0) | 2020.08.31 |
---|---|
Elasticsearch 최대 메모리 크기를 변경하는 방법 (0) | 2020.08.31 |
RecyclerView에서 마지막 자식의 여백 / 패딩 (0) | 2020.08.31 |
모달에 매개 변수를 전달하는 방법은 무엇입니까? (0) | 2020.08.31 |
자리 표시 자에 글꼴 굉장 아이콘 사용 (0) | 2020.08.31 |