Redhat Linux 서버를 사용하고 있으며 MongoDB를 설치하려고합니다.
링크에 제공된 단계를 따르고 있습니다 : https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/
1 단계 : yum을 사용하여 MongoDB를 직접 설치할 수 있도록 /etc/yum.repos.d/mongodb-org-4.0.repo 파일을 만듭니다.
sudo nano /etc/yum.repos.d/mongodb-org-4.0.repo
2 단계 : 새로 생성 된 파일의 코드 아래에 복사하여 붙여 넣습니다.
[mongodb-org-4.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc
3 단계 : MongoDB의 특정 릴리스를 설치하려면 다음 예와 같이 각 구성 요소 패키지를 개별적으로 지정하고 버전 번호를 패키지 이름에 추가합니다.
sudo yum install -y mongodb-org
이 모든 후 아래에 주어진 오류가 발생합니다.
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
file:///packages/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /packages/repodata/repomd.xml"
Trying other mirror.`
One of the configured repositories failed (local),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:`
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=localrepo ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable localrepo
or
subscription-manager repos --disable=localrepo
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=localrepo.skip_if_unavailable=true
failure: repodata/repomd.xml from localrepo: [Errno 256] No more mirrors to try.
file:///packages/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /packages/repodata/repomd.xml"
서버 OS
NAME="Red Hat Enterprise Linux Server"
VERSION="7.3 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="7.3"
PRETTY_NAME="Red Hat Enterprise Linux"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.3:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.3
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.3"
이미 아래 단계를 따랐지만 내 경우에는 작동하지 않습니다.
sudo rm -rf /etc/yum.repos.d/mongodb-org-4.0.repo
sudo yum clean all
이 오류를 어떻게 해결할 수 있습니까?
당신은 확인해야 base을 /etc/yum.repos.d/mongodb-org-4.0.repo 파일입니다. baseurl에서 releaseserver 버전을 변경할 수도 있습니다.
다음은 내 /etc/yum.repos.d/mongodb-org-4.0.repo 파일입니다.
[mongodb-org-4.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/7/mongodb-org/4.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc
그것은 나를 위해 작동합니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다