How to solve the problem of installing mongodb on ubuntu?

I want to backup my alerts settings, so i command “mongodump -h dbhost -d dbname -o dbdirectory”, but I have some trouble

this my Error message

and i command" sudo apt-get install mongodb-clients "
this my Error message



and i command" sudo apt-get update "
this my Error message


Looking forward for your reply.
Thank you

Make sure that the name resolution on that machine is working, /etc/resolv.conf, resolvconf, etc.

1 Like

Thank you @jochen , I successfully downloaded mongodb tools
Now have to backup , But how do I solve this problem?

Looking forward for your reply.
Thank you

Make sure that the system user you’re running the command with has permission to write into the directory you’ve given to mongodump.

Check the output of the following command:

# namei -l /etc/graylog/backup/

Hi @jochen:

Thank you, I check the command

Is this has permission ?

Looking forward for your reply.
Thank you

As you can see from the output, only the user “root” is allowed to write into the directory /etc/graylog/backup/.

For an introduction to Linux file system permissions, please refer to

1 Like

hi @jochen
Thank you for your answer
and I want to ask What command can make me get permission?
Let (mongodump -h 127.0.0.1 -d graylog -o /etc/graylog/backup) can run?

Looking forward for your reply.
Thank you

Either use a different directory, run the command as “root”, or change the permissions of /etc/graylog/backup/ with chown or chgrp.

1 Like

hi @jochen

Thank you very much !!! I succeed to make it run

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.