cannot communicate with server: Post http://localhost/v2/snaps/discord: dial unix /run/snapd.socket: connect: connection refused - linux

I want to install discord via snap (Linux package format), but i get the following error:
cannot communicate with server: Post http://localhost/v2/snaps/discord: dial unix /run/snapd.socket: connect: connection refused
Don't know why ...

Maybe you don't have the snad service running
To start it onetimes do:
sudo systemctl start snapd
To enable that it always start with your system do:
sudo systemctl enable snapd

Unmask it:
sudo systemctl unmask snapd.service
Enable it:
sudo systemctl enable snapd.service
Start it:
sudo systemctl start snapd.service

I've been having the same issue for some time now.
I solved the issue by uninstalling snap and then reinstalling it:
$ sudo apt autoremove --purge snapd
$ sudo apt install snapd

This issue came to me because i changed permission to 777
I searched every where and I find only this solution is best
sudo apt-get purge snapd
sudo apt-get install snapd

This issue came when i was trying to install spotify on my kali machine using snap "snapd"
so this issue can be solved with the following commands on the terminal
Firstly install snap **$ sudo apt install snapd**
or remove it by **$ sudo apt autoremove --purge snapd** then install it again
Then enter the following commands
$ sudo systemctl enable snapd`
$ sudo systemctl start snapd
$ sudo snap install spotify
you should be able to download spotify on your kali/ubuntu Machine

Related

How do i fix the snapd.socket no such file or directory error on MxLinux?

I've been trying to install a couple of apps using sudo snap install <nameofapp>
But whenever I try this I always get the same error:
error: cannot communicate with server: Post http://localhost/v2/snaps/standard-notes: dial unix /run/snapd.socket: connect: no such file or directory
I'm on MXLINUX please help
I am working with a Debian system (5.5.0-kali1-amd64 #1 SMP Debian 5.5.13-2kali1 (2020-04-03) x86_64 GNU/Linux)
).
I found that when I tried to install notepad++. I got the same error. These command worked for me. Hope they do for you.
sudo service snapd start
sudo systemctl start snapd.service
sudo snap install notepad-plus-plus
sudo apt-get install snapd
service snapd start
sudo snap install notepad-plus-plus --edge
You will get updated Notepad++

Unable to install libsasl2-devel on Amazon Linux 2 machine

I am running Ansible playbook and trying to install OS dependencies packages for python. I am trying to run the following:
sudo yum install gcc gcc-c++ libffi-devel python-devel python-pip python-wheel openssl-devel libsasl2-devel openldap-devel
However, it fails at installing libsasl2-devel with the message:
"No package matching 'libsasl2-devel' found available, installed or updated"
All my instances are Amazon Linux 2 machines. Is there any alternative package for this? I tried to look into this but I found solutions for Ubuntu only.
I was able to get it to work in a series of steps. Its a yum issue after other databases are installed and not cleaned up before installing mysql
clear sasl first: sudo yum remove cyrus-sasl
if you have installed maria, there will be conflicts, remove that as well
sudo yum remove mariadb mariadb-server mariadb-libs
take note of anything uninstalled by this to re-add later. If this is too much, you can take a risk and not remove sasl, but it might not reset the availability of the package.
Start here to clean up the dependency issues: https://serverfault.com/questions/873955/how-solve-mysql-5-7-dependency follow the command given by clean all as sudo rm -rf /var/cache/yum/*
This can possibly resolve your issues right there, if not continue the installation below.
delete all data left in /var/lib/mysql/ or you may have upgrade issues.
resinstall sasl:
sudo yum install cyrus-sasl cyrus-sasl-devel and any other packages removed above.
Establish mysql5.7 with the yum services.
wget https://dev.mysql.com/get/mysql57-community-release-el6-11.noarch.rpm
sudo yum localinstall -y mysql57-community-release-el6-11.noarch.rpm
sudo yum repolist enabled | grep "mysql.*-community.*"
sudo yum repolist enabled | grep mysql
sudo yum install -y mysql-community-common mysql-community-libs mysql-community-server mysql-community-client
if that doesn't work, re-clear the yum cache again and re-run sudo yum install -y mysql-community-server
if that works, then
sudo service mysqld start
IF the /var/lib/mysql is empty, it will have created a temporary password in the /var/log/mysqld.log (use sudo to read)
run sudo mysql_secure_installation and establish your real password and security settings.
now you should have access via mysql -u root -p

Can't run the docker

I just install the Docker on Ubuntu18.04 by using:
sudo apt update
sudo apt upgrade
sudo apt install docker.io
sudo service docker start
All of the above commands work normally, but when I check the status of the docker servicesudo service docker status, it shows"Docker is not running". I have tried sudo service docker restart, but it doesn't work.
I think you missed the docker-ce package:
sudo apt-get install docker-ce
for more information check the documentation at: install docker ce

How to Install Gitlab on Centos 6.6 VPS?

I tried installing as mentioned here: https://about.gitlab.com/downloads/
sudo yum install openssh-server
sudo yum install postfix
sudo yum install cronie
sudo service postfix start
sudo chkconfig postfix on
sudo lokkit -s http -s ssh
curl -O https://downloads-packages.s3.amazonaws.com/centos-6.6/gitlab-7.7.2_omnibus.5.4.2.ci-1.el6.x86_64.rpm
sudo rpm -i gitlab-7.7.2_omnibus.5.4.2.ci-1.el6.x86_64.rpm
sudo gitlab-ctl reconfigure
It looks like everything went successfully, but but I don't get anything on my hostname. Is there anything I missed?
GitLab will try to setup the FQDN by using the hostname of your machine. To do this manually, open /etc/gitlab/gitlab.rb and edit the external url according to the documentation, which by the way if you haven't already read, I suggest that you do it!

Mongo: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145

When I try to run mongo in shell in ubuntu or open rockmongo I see this error:
couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145
What's the reason? I tried to reinstall mongo but this didn't help. When I type sudo apt-get purge mongodb-10gen returned error is
E: Sub-process /usr/bin/dpkg returned an error code (1)
I tried this:
first remove line about mongo in /etc/apt/sources.list
run this commands:
sudo dpkg pr mongofb-10gen
sudo apt-get -f install
sudo apt-get upadte
sudo apt-get upgrade
then sudo apt-get purge mongodb-10gen is successful
at the end:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
add deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen
in /etc/apt/sources.list
sudo apt-get update
sudo apt-get install mongodb-10gen
Then when I try to start mongo i saw the same error. :o
I assume that you followed the steps, outlined here.
Most probably you have a problem with mongo lock (or at least I had it once while installing on ubuntu). I solved it with the following commands:
sudo rm /var/lib/mongodb/mongod.lock
sudo service mongodb restart
P.S. I by myself recently experienced this problem when I was updating my amazon ec2 instance. I have not properly shut down mongo before doing this and this resulted in a problem with mongo lock.
Check your log file of mongodb. you will get to know the exact issue.
tail -f /var/log/mongodb/mongodb.log
The issue may because of "ERROR: Insufficient free space for journal files"
Increase your volume space that will fix your issue.
If you got this after a restart... Make sure that you have over 3GB+ of space free else Mongo Won't start.
even i had the same problem so i deleted the mongod lock file
sudo rm /var/lib/mongodb/mongod.lock
and the restart the server it worked , restarting by command below
sudo service mongodb restart
i got the solution by changing the owner of db directory to 'mongodb'
`sudo chown -R mongodb:mongodb /data/*`
then type 'mongo'
I guess the reason why you cannot connect to mongodb is the insufficient space in the drive on your computer.

Resources