Tôi đang cố cài đặt MongoDb CLI (https://docs.mongodb.com/mongocli/master/install/). Tôi bắt đầu bằng cách chạy wget --no-check-certificate -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key thêm -
bởi vì một chạy wget -vO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key thêm -
cho tôi biết tôi nên sử dụng '--no-check-cert'. Tôi nhận được phản hồi 'OK' trên chứng chỉ sau khi thêm '--no-check-cert' vào lệnh.
Sau khi tôi chạy echo "deb [ arch=amd64,arm64] https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list
tôi thử chạy sudo apt-get cập nhật
Và nhận
Bỏ qua:1 https://repo.mongodb.org/apt/ubuntu/distsfocal/mongodb-org/5.0 InRelease
Err:2 https://repo.mongodb.org/apt/ubuntu/distsfocal/mongodb-org/5.0 Bản phát hành
Xác minh chứng chỉ không thành công: Chứng chỉ KHÔNG đáng tin cậy. Tổ chức phát hành chứng chỉ không xác định. Không thể bắt tay: Lỗi khi xác minh chứng chỉ. [IP: 99.84.102.50 443]
Nhận:3 http://security.ubuntu.com/ubuntufocal-security InRelease [114 kB]
Lần truy cập:4 http://archive.ubuntu.com/ubuntu tiêu điểm InRelease
Lần truy cập:5 http://archive.ubuntu.com/ubuntufocal-updatesInRelease
Lần truy cập:6 http://archive.ubuntu.com/ubuntufocal-backports InRelease
Đang đọc danh sách gói... Xong
E: Kho lưu trữ 'https://repo.mongodb.org/apt/ubuntu/distsfocal/mongodb-org/5.0 Release' không có tệp Phát hành.
N: Không thể thực hiện cập nhật từ một kho lưu trữ như vậy một cách an toàn và do đó bị tắt theo mặc định.
N: Xem trang chủ apt-secure(8) để biết chi tiết cấu hình người dùng và tạo kho lưu trữ.
Sau đó, tôi đã thử một cách tiếp cận khác như đã đề cập trên các bảng trả lời khác - Bạn có thể thêm [trusted=yes] vào nguồn.list Vì vậy, tôi chạy echo "deb [Trusted=yes] https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list
và sau đó sudo apt-get cập nhật
lần nữa. Lần này tôi thấy:
Bỏ qua:1 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0 InRelease
Lần truy cập:2 http://security.ubuntu.com/ubuntufocal-security InRelease
Ign:3 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0 Phát hành
Ign:4 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse all Packages
Ign:5 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse Gói AMD64
Lần truy cập:6 http://archive.ubuntu.com/ubuntu tiêu điểm InRelease
Ign:7 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse Translation-en
Ign:8 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse tất cả Siêu dữ liệu c-n-f
Lần truy cập:9 http://archive.ubuntu.com/ubuntufocal-updatesInRelease
Ign:10 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse amd64 c-n-f Siêu dữ liệu
Ign:4 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse all Packages
Ign:5 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse Gói AMD64
Lần truy cập:11 http://archive.ubuntu.com/ubuntufocal-backports InRelease
Ign:7 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse Translation-en
Ign:8 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse tất cả Siêu dữ liệu c-n-f
Ign:10 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse amd64 c-n-f Siêu dữ liệu
Ign:4 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse all Packages
Ign:5 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse Gói AMD64
Ign:7 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse Translation-en
Ign:8 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse tất cả Siêu dữ liệu c-n-f
Ign:10 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse amd64 c-n-f Siêu dữ liệu
Ign:4 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse all Packages
Ign:5 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse Gói AMD64
Ign:7 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse Translation-en
Ign:8 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse tất cả Siêu dữ liệu c-n-f
Ign:10 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse amd64 c-n-f Siêu dữ liệu
Ign:4 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse all Packages
Ign:5 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse Gói AMD64
Ign:7 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse Translation-en
Ign:8 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse tất cả Siêu dữ liệu c-n-f
Ign:10 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse amd64 c-n-f Siêu dữ liệu
Ign:4 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse all Packages
Ign:5 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse Gói AMD64
Ign:7 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse Translation-en
Ign:8 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse tất cả Siêu dữ liệu c-n-f
Ign:10 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse amd64 c-n-f Siêu dữ liệu
Ign:4 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse all Packages
Err:5 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse Gói AMD64
Xác minh chứng chỉ không thành công: Chứng chỉ KHÔNG đáng tin cậy. Tổ chức phát hành chứng chỉ không xác định. Không thể bắt tay: Lỗi khi xác minh chứng chỉ. [IP: 99.84.102.2 443]
Ign:7 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse Translation-en
Ign:8 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse tất cả Siêu dữ liệu c-n-f
Ign:10 https://repo.mongodb.org/apt/ubuntufocal/mongodb-org/5.0/multiverse amd64 c-n-f Siêu dữ liệu
Đang đọc danh sách gói... Xong
E: Không tìm nạp được https://repo.mongodb.org/apt/ubuntu/dists/focal/mongodb-org/5.0/multiverse/binary-amd64/Packages Xác minh chứng chỉ không thành công: Chứng chỉ KHÔNG đáng tin cậy. Tổ chức phát hành chứng chỉ không xác định. Không thể bắt tay: Lỗi khi xác minh chứng chỉ. [IP: 99.84.102.2 443]
E: Một số tệp chỉ mục không tải xuống được. Họ đã bị bỏ qua, hoặc những người thân cũ được sử dụng để thay thế.
Có vẻ ấn tượng với nhiều dòng đầu ra hơn, nhưng vẫn có cùng một vấn đề. Tôi đã xem xét việc thay đổi loại khóa thành gpg (Những lệnh nào (chính xác) sẽ thay thế khóa apt không dùng nữa?) và sử dụng [được ký bởi=/usr/local/share/keyrings/<your-keyfile-name>.gpg]
mẹo, nhưng điều đó không giúp được gì. Tôi không cảm thấy đây là vấn đề về chứng chỉ địa phương mà tôi đang gặp phải. Bất kỳ trợ giúp sẽ được đánh giá cao.