AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题

问题[mongodb](ubuntu)

Martin Hope
ishfaq
Asked: 2024-01-13 22:00:38 +0800 CST

如何在 Ubuntu 23.10 上安装 MongoDB 社区服务器

  • 7

根据 MogoDB 文档,

MongoDB 7.0 社区版支持 x86_64 架构上的以下 64 位 Ubuntu LTS(长期支持)版本:

22.04 LTS(“杰米”)

20.04 LTS(“焦点”)

mongodb
  • 2 个回答
  • 113 Views
Martin Hope
Jedi
Asked: 2023-12-11 12:02:00 +0800 CST

签名无效

  • 5

我正在运行 Ubuntu 22.04,并尝试按照此处的说明安装 UniFi 网络服务器。

root@orac:/home/mike# sudo apt-get update && sudo apt-get install ca-certificates apt-transport-https
Hit:1 http://nz.archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://nz.archive.ubuntu.com/ubuntu jammy-updates InRelease              
Hit:3 http://nz.archive.ubuntu.com/ubuntu jammy-backports InRelease            
Get:4 https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/xUbuntu_22.04 ./ InRelease [1,604 B]
Hit:5 https://ppa.launchpadcontent.net/yannubuntu/boot-repair/ubuntu jammy InRelease
Hit:6 http://security.ubuntu.com/ubuntu jammy-security InRelease
Fetched 1,604 B in 3s (508 B/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
ca-certificates is already the newest version (20230311ubuntu0.22.04.1).
ca-certificates set to manually installed.
The following NEW packages will be installed:
  apt-transport-https
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 1,510 B of archives.
After this operation, 170 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://nz.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 apt-transport-https all 2.4.11 [1,510 B]
Fetched 1,510 B in 0s (4,899 B/s)               
Requesting to save current system state
Successfully saved as "autozsys_pl49je"
Selecting previously unselected package apt-transport-https.
(Reading database ... 447867 files and directories currently installed.)
Preparing to unpack .../apt-transport-https_2.4.11_all.deb ...
Unpacking apt-transport-https (2.4.11) ...
Setting up apt-transport-https (2.4.11) ...
ZSys is adding automatic system snapshot to GRUB menu
root@orac:/home/mike# echo 'deb [ arch=amd64,arm64 ] https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list
deb [ arch=amd64,arm64 ] https://www.ui.com/downloads/unifi/debian stable ubiquiti
root@orac:/home/mike# sudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg
--2023-12-11 16:46:44--  https://dl.ui.com/unifi/unifi-repo.gpg
Resolving dl.ui.com (dl.ui.com)... 65.9.142.121
Connecting to dl.ui.com (dl.ui.com)|65.9.142.121|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1196 (1.2K)
Saving to: ‘/etc/apt/trusted.gpg.d/unifi-repo.gpg’

/etc/apt/trusted.gp 100%[===================>]   1.17K  --.-KB/s    in 0s      

2023-12-11 16:46:44 (1.47 GB/s) - ‘/etc/apt/trusted.gpg.d/unifi-repo.gpg’ saved [1196/1196]

root@orac:/home/mike# wget -qO - https://www.mongodb.org/static/pgp/server-3.6.asc | sudo apt-key add -
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK
root@orac:/home/mike# echo "deb https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
deb https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 multiverse
root@orac:/home/mike# sudo apt-get update
Hit:1 http://nz.archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://nz.archive.ubuntu.com/ubuntu jammy-updates InRelease              
Hit:3 http://nz.archive.ubuntu.com/ubuntu jammy-backports InRelease            
Ign:4 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 InRelease     
Hit:5 http://security.ubuntu.com/ubuntu jammy-security InRelease               
Get:6 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release [2,495 B]
Get:7 https://dl.ui.com/unifi/debian stable InRelease [2,292 B]                
Get:8 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release.gpg [801 B]
Ign:8 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release.gpg   
Get:9 https://dl.ui.com/unifi/debian stable/ubiquiti amd64 Packages [714 B]
Get:10 https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/xUbuntu_22.04 ./ InRelease [1,604 B]
Get:11 https://dl.ui.com/unifi/debian stable/ubiquiti arm64 Packages [714 B]
Hit:12 https://ppa.launchpadcontent.net/yannubuntu/boot-repair/ubuntu jammy InRelease
Reading package lists... Done
W: https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/Release.gpg: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: GPG error: https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release: The following signatures were invalid: EXPKEYSIG 58712A2291FA4AD5 MongoDB 3.6 Release Signing Key <[email protected]>
E: The repository 'https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
root@orac:/home/mike# sudo apt-get update && sudo apt-get install unifi -y
Hit:1 http://nz.archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://nz.archive.ubuntu.com/ubuntu jammy-updates InRelease              
Hit:3 http://nz.archive.ubuntu.com/ubuntu jammy-backports InRelease            
Hit:4 https://dl.ui.com/unifi/debian stable InRelease                          
Ign:5 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 InRelease     
Hit:6 http://security.ubuntu.com/ubuntu jammy-security InRelease               
Get:7 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release [2,495 B]
Get:8 https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/xUbuntu_22.04 ./ InRelease [1,604 B]
Get:9 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release.gpg [801 B]
Hit:10 https://ppa.launchpadcontent.net/yannubuntu/boot-repair/ubuntu jammy InRelease
Ign:9 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release.gpg
Reading package lists... Done
W: https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/Release.gpg: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: GPG error: https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release: The following signatures were invalid: EXPKEYSIG 58712A2291FA4AD5 MongoDB 3.6 Release Signing Key <[email protected]>
E: The repository 'https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
root@orac:/home/mike# sudo service unifi status
Unit unifi.service could not be found.

有谁知道如何解决这一问题?

我认为这与此有关:

root@orac:/home/mike# apt update
Hit:1 http://nz.archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://nz.archive.ubuntu.com/ubuntu jammy-updates InRelease                                                                                                     
Hit:3 http://nz.archive.ubuntu.com/ubuntu jammy-backports InRelease                                                                                                   
Hit:4 https://dl.ui.com/unifi/debian stable InRelease                                                                                                                 
Hit:5 http://security.ubuntu.com/ubuntu jammy-security InRelease                                                                                                      
Ign:6 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 InRelease                                                                                    
Get:7 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release [2,495 B]                                                      
Get:8 https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/xUbuntu_22.04 ./ InRelease [1,604 B]
Get:9 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release.gpg [801 B]
Ign:9 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release.gpg
Hit:10 https://ppa.launchpadcontent.net/yannubuntu/boot-repair/ubuntu jammy InRelease                                                                                 
Reading package lists... Done                                                                                                                                         
W: https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/Release.gpg: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: GPG error: https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release: The following signatures were invalid: EXPKEYSIG 58712A2291FA4AD5 MongoDB 3.6 Release Signing Key <[email protected]>
E: The repository 'https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

为什么说签名无效?

我在这里尝试了解决方案:

mike@orac:~$ sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 58712A2291FA4AD5
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.pKHz7AaGfL/gpg.1.sh --keyserver keys.gnupg.net --recv-keys 58712A2291FA4AD5
gpg: keyserver receive failed: Server indicated a failure

还尝试了评论部分指出的解决方案:

mike@orac:~$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 58712A2291FA4AD5
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.umOksSwsow/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 58712A2291FA4AD5
gpg: key 58712A2291FA4AD5: "MongoDB 3.6 Release Signing Key <[email protected]>" 1 new signature
gpg: Total number processed: 1
gpg:         new signatures: 1
mike@orac:~$ sudo apt update
Hit:1 http://nz.archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://nz.archive.ubuntu.com/ubuntu jammy-updates InRelease                                                                                                                                  
Hit:3 http://nz.archive.ubuntu.com/ubuntu jammy-backports InRelease                                                                                                                                                      
Hit:4 https://dl.ui.com/unifi/debian stable InRelease                                                                                                                                                                                         
Ign:5 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 InRelease                                                                                                                                                                    
Hit:6 http://security.ubuntu.com/ubuntu jammy-security InRelease                                                                                                                              
Get:7 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release [2,495 B]                                                      
Get:8 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release.gpg [801 B]                   
Get:9 https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/xUbuntu_22.04 ./ InRelease [1,604 B]
Hit:10 https://ppa.launchpadcontent.net/yannubuntu/boot-repair/ubuntu jammy InRelease
Ign:8 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release.gpg
Reading package lists... Done
W: https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/Release.gpg: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: GPG error: https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release: The following signatures were invalid: EXPKEYSIG 58712A2291FA4AD5 MongoDB 3.6 Release Signing Key <[email protected]>
E: The repository 'https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
mongodb
  • 2 个回答
  • 950 Views
Martin Hope
Gatxy
Asked: 2020-07-20 02:57:51 +0800 CST

下载 mongoDB 错误

  • 2

上个月使用sudo apt install mongodb-org我找到的软件包将 mongoDB 下载到我的 Ubuntu 20.04 上,安装它并且 mongodb 工作正常。但是我删除了它,当我尝试重新安装它时,相同的命令输出“无法找到文件 mongodb-org”。 sudo apt install mongodb有效,但sudo systemctl start mongod.service输出“无法启动 mongod.service:未找到单元 mongod.service”。我该如何解决这个问题?我曾经将我的 ubuntu 软件设置为从主服务器下载,但它最初是从我当地的本国服务器下载的,我将设置改回。这可能是一个问题吗?

server gnome-terminal ubuntu-tweak database mongodb
  • 1 个回答
  • 59 Views
Martin Hope
Tyler B. Joudrey
Asked: 2020-06-08 09:41:40 +0800 CST

由于 Ubuntu 20.04 上的 GPG 错误,无法正确安装 mongod

  • 1

我正在尝试通过 cli 在 Ubuntu 上安装 mongodb。跑步后sudo apt-get update我收到这个

Hit:1 http://ca.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://security.ubuntu.com/ubuntu focal-security InRelease                              
Hit:3 http://dl.google.com/linux/chrome/deb stable InRelease                                  
Hit:4 http://ca.archive.ubuntu.com/ubuntu focal-updates InRelease   
Ign:5 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 InRelease
Hit:6 http://ca.archive.ubuntu.com/ubuntu focal-backports InRelease
Get:7 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 Release [3,462 B]
Get:8 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 Release.gpg [801 B]
Ign:8 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 Release.gpg
Reading package lists... Done
W: GPG error: http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D68FA50FEA312927
E: The repository 'http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

我该如何解决?

repository apt gnupg mongodb
  • 1 个回答
  • 1661 Views
Martin Hope
Lunodzo
Asked: 2020-04-26 03:53:40 +0800 CST

处理时遇到错误:munin-mongo

  • 1

我一直在尝试安装软件包但没有成功,我收到错误消息

Errors were encountered while processing:
 munin-mongo
E: Sub-process /usr/bin/dpkg returned an error code (1) 

如果我尝试安装 mongodb 它以

ln: failed to create symbolic link './mongo_btree': File exists
dpkg: error processing package munin-mongo (--configure):
 installed munin-mongo package post-installation script subprocess returned erro
r exit status 1
Errors were encountered while processing:
 munin-mongo
E: Sub-process /usr/bin/dpkg returned an error code (1)
software-installation dpkg mongodb munin
  • 1 个回答
  • 54 Views
Martin Hope
provks
Asked: 2020-04-06 07:40:18 +0800 CST

在 Ubuntu 19.04 上安装 MongoDB 时出现未满足的依赖错误!虽然它显示了 mongo shell 但不起作用。重装不行![复制]

  • 2
这个问题在这里已经有了答案:
dpkg 错误:“正在尝试覆盖文件,该文件也在...” (5 个答案)
2年前关闭。

我正在尝试从官方网站在 Ubuntu 19.04 上安装 MongoDB 。但面临错误

尽管我很清楚我的 Ubuntu 版本不是 LTS,但我遵循的程序与官方文档中所写的完全相同。

在安装 MongoDB 命令的最后一步之前,所有步骤都很顺利。你可以在这里看到错误。

vks@247:~$ sudo apt-get install -y mongodb-org
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 mongodb-org : Depends: mongodb-org-server but it is not going to be installed
               Depends: mongodb-org-mongos but it is not going to be installed
               Depends: mongodb-org-tools but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

我还尝试了命令:apt --fix-broken install,但它不起作用并显示如下:

vks@247:~$ sudo apt --fix-broken install
[sudo] password for vks: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libboost-program-options1.67.0 libgoogle-perftools4 libtcmalloc-minimal4 libyaml-cpp0.6 mongo-tools mongodb-server-core
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  mongodb-org-mongos mongodb-org-server mongodb-org-tools
The following NEW packages will be installed:
  mongodb-org-mongos mongodb-org-server mongodb-org-tools
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/85.7 MB of archives.
After this operation, 248 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 217305 files and directories currently installed.)
Preparing to unpack .../mongodb-org-server_4.2.5_amd64.deb ...
Unpacking mongodb-org-server (4.2.5) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-server_4.2.5_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/mongod', which is also in package mongodb-server-core 1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu2
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../mongodb-org-mongos_4.2.5_amd64.deb ...
Unpacking mongodb-org-mongos (4.2.5) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-mongos_4.2.5_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/mongos', which is also in package mongodb-server-core 1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu2
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../mongodb-org-tools_4.2.5_amd64.deb ...
Unpacking mongodb-org-tools (4.2.5) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-tools_4.2.5_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/bsondump', which is also in package mongo-tools 3.6.3-0ubuntu1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/mongodb-org-server_4.2.5_amd64.deb
 /var/cache/apt/archives/mongodb-org-mongos_4.2.5_amd64.deb
 /var/cache/apt/archives/mongodb-org-tools_4.2.5_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

在此之后,我也尝试安装指定的版本(尽管它是相同的版本)。

vks@247:~$ sudo apt-get install -y mongodb-org=4.2.5 mongodb-org-server=4.2.5 mongodb-org-shell=4.2.5 mongodb-org-mongos=4.2.5 mongodb-org-tools=4.2.5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libboost-program-options1.67.0 libgoogle-perftools4 libtcmalloc-minimal4
  libyaml-cpp0.6 mongo-tools mongodb-server-core
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  mongodb-org-mongos mongodb-org-server mongodb-org-tools
The following packages will be upgraded:
  mongodb-org mongodb-org-shell
2 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 97.7 MB of archives.
After this operation, 255 MB of additional disk space will be used.
Get:1 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2/multiverse amd64 mongodb-org-shell amd64 4.2.5 [12.0 MB]
Get:2 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2/multiverse amd64 mongodb-org-server amd64 4.2.5 [18.5 MB]
Get:3 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2/multiverse amd64 mongodb-org-mongos amd64 4.2.5 [10.2 MB]
Get:4 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2/multiverse amd64 mongodb-org-tools amd64 4.2.5 [57.0 MB]
Get:5 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2/multiverse amd64 mongodb-org amd64 4.2.5 [3,532 B]
Fetched 97.7 MB in 20s (4,836 kB/s)                                            
(Reading database ... 217305 files and directories currently installed.)
Preparing to unpack .../mongodb-org-shell_4.2.5_amd64.deb ...
Unpacking mongodb-org-shell (4.2.5) over (4.0.17) ...
Preparing to unpack .../mongodb-org-server_4.2.5_amd64.deb ...
Unpacking mongodb-org-server (4.2.5) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-server_4.2.5_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/mongod', which is also in package mongodb-server-core 1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu2
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../mongodb-org-mongos_4.2.5_amd64.deb ...
Unpacking mongodb-org-mongos (4.2.5) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-mongos_4.2.5_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/mongos', which is also in package mongodb-server-core 1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu2
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../mongodb-org-tools_4.2.5_amd64.deb ...
Unpacking mongodb-org-tools (4.2.5) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-tools_4.2.5_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/bsondump', which is also in package mongo-tools 3.6.3-0ubuntu1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../mongodb-org_4.2.5_amd64.deb ...
Unpacking mongodb-org (4.2.5) over (4.0.17) ...
Errors were encountered while processing:
 /var/cache/apt/archives/mongodb-org-server_4.2.5_amd64.deb
 /var/cache/apt/archives/mongodb-org-mongos_4.2.5_amd64.deb
 /var/cache/apt/archives/mongodb-org-tools_4.2.5_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

问题保持不变。

我也尝试从各个站点解决此问题,但无法解决。任何帮助将不胜感激。

software-installation mongodb
  • 1 个回答
  • 2117 Views
Martin Hope
Amit Kumar
Asked: 2020-01-18 04:42:51 +0800 CST

无法在 WSL 上启动 MongoDB

  • 1

我已经使用此处官方文档中的步骤在 WSL 上安装了 MongoDb 。

当我发出命令时, sudo service mongod start 我收到以下消息 mongod: unrecognized service。

我尝试使用这些stackoverflow 答案进行故障排除。我开始使用其中一个命令 sudo mongod --fork -f /etc/mongod.conf

但是我不能停止 mongod 使用sudo service mongod stop. 事实上,即使在我关闭 WSL 之后,mongod 也会继续运行。文档有错吗?还是我做错了什么?为什么文档中列出的命令不起作用?

如果我继续使用上述命令启动 mongodb 会影响我存储的数据吗?

mongodb 18.04 windows-subsystem-for-linux
  • 2 个回答
  • 10432 Views
Martin Hope
Naveen
Asked: 2019-07-16 06:08:29 +0800 CST

如何永久更改 Mongodb 中的数据库路径?

  • 0

我尝试mongod --dbpath=/data选择更改数据目录位置,方法是执行此命令 在前台连续运行等待连接

它适用于 mongo CLI,但是在我mongod --dbpath=/data按 CTRL +C 停止后,mongo CLI 拒绝连接

然后重启mongod服务后,就正常使用根目录下的默认路径了。

然后我在/etc/mongodb.conf db path 参数中编辑,mongob 服务无法启动后

已加载:已加载(/lib/systemd/system/mongod.service;已禁用;供应商预设:
   活动:自 2019 年 7 月 15 日星期一 IST 19:36:47 以来失败(结果:退出代码);5 秒前
     文档:https://docs.mongodb.org/manual
  进程:5355 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=exited
 主 PID:5355(代码=退出,状态=2)

我如何使这个永久

**我将新目录所有权更改为 mongodb 用户 **我使用的是 Ubuntu

mongodb nodejs
  • 2 个回答
  • 1459 Views
Martin Hope
John Smith
Asked: 2019-06-20 03:08:58 +0800 CST

为多个开发人员和生产使用设置 MongoDB

  • 3

有人告诉我,Docker是创建用户与实际生产分离的方法。是否有可能在不影响原始数据库的情况下进一步分离并安装单独的MongoDB数据库?

我很乐意学习。提前非常感谢!

mongodb docker 18.04
  • 1 个回答
  • 256 Views
Martin Hope
Zenit
Asked: 2019-05-07 11:13:42 +0800 CST

执行命令出错,退出

  • 6

我正在尝试在 Ubuntu 18 上安装 node.js 12 并按照说明操作,当我输入

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -

我得到了下一个文本:

Reading package lists... Done                                                                                                                                                                                     
E: The repository 'http://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.4 Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.0 Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Ubuntu_18.10  Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4ABE1AC7557BEFF9
E: The repository 'http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Ubuntu_18.10  Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 Release: The following signatures were invalid: EXPKEYSIG 58712A2291FA4AD5 MongoDB 3.6 Release Signing Key <[email protected]>
E: The repository 'http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Error executing command, exiting

我想这就是为什么我每次跑步的原因

sudo apt-get install -y nodejs 

我得到的是版本 8 而不是 10。
有人知道为什么会这样吗?我是怎么走到这一步的?
如果我的系统存在安全风险,该如何解决?

command-line mongodb nodejs
  • 1 个回答
  • 8359 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve