Problem with running brew services list command - homebrew

I used homebrew and installed 'mongodb' and other services with it and I used brew services list to see my services and other brew commands to start and stop or restart them but today I could do any commands when I run brew services list it gives me this
Warning: No services available to control with 'brew services'
I know what this says but I used this before and I face this problem today I couldn't find out why?
I tried using brew update --force but it didn't work

Short answer: none of your Homebrew-installed packages expose services.
Longer answer, specifically for MongoDB: MongoDB has been removed from Homebrew core due to its license. You can install MongoDB with Homebrew using the MongoDB Homebrew tap:
$ brew tap mongodb/brew
$ brew install mongodb-community
$ brew services start mongodb-community
Note that Homebrew removing the formula doesn't seem to stop the old mongod daemon (although it does remove it from the brew services list, so you can't brew services stop it), so if the service had previously been running you'll need to stop it (e.g. using ps -x | grep mongo followed by kill <pid>) then start the new service.

Related

Hash Sum mismatch error, and others, while Installing Docker on Ubuntu 18.04 VM (VirtualBox)

Preface that I'm running these commands on a VirtualBox VM, Ubuntu Server 18.04. Unfortunately I can't get the bidirectional clipboard to work so I have to post all the output as links. Super sorry about that.
I've been trying to install Docker on an Ubuntu 18.04 VM on VirtualBox running on a Windows 10 Home, Version 10.0.19041 host. I've been encountering issues at every turn.
First, I tried to install with apt-get after following the instructions on the Docker Ubuntu install tutorial, to no avail. I get an error with "Hash Sum mismatch" shown pretty frequently. I also tried running the convenience script (i.e. curl -fsSL https://get.docker.com -o get-docker.sh followed by sudo sh get-docker.sh) on a completely fresh machine, and got the same errors.
After I was unable to install with apt-get, I tried downloading the packages and installing manually. When trying to curl the packages with
sudo curl -k -O -L https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/docker-ce_18.09.9~3-0~ubuntu-bionic_amd64.deb
and the same curl for docker-ce-cli and containerd.io debs I'm able to complete the downloads just fine. Then, when I run
sudo dpkg -i ./docker-ce_18.09.9~3-0~ubuntu-bionic_amd64.deb
to install the packages, I get these dpkg Errors, claiming that the deb is corrupted. I get the same errors no matter which deb I specify.
I suppose at the end of the day, Docker isn't strictly necessary for the project I'm working on, but it's very frustrating that I'm at such a loss. I'd be very grateful if anyone can give me some guidance. Please feel free to comment if you need any more system info.
p.s. I've seen a couple theories but don't know how to address them.
Possibly, an issue with WSL2 and the Virtual Machine Platform on Windows. Discussed in this thread, but it didn't seem like anyone found a solution.
An issue related to apt-cache and /var/lib/apt/lists/*, which I've already cleaned cleared multiple times.
I've also run apt-get update more times than I can count.
Update here. In the end I was unable to install Docker on my VirtualBox VM. The thing that worked for me was booting up an Ubuntu 18.04 VM in VMware. With all the same specifications, I was able to install Docker and get my application running. If anyone comes back to this question and finds a fix for this on VirtualBox, please post it and I'll mark it as the answer!
The GCrypt so library has a real issue computing hashes when running VirtualBox or other VM software under Windows 10. I made a video about this.
https://youtu.be/inU8pQLXIkE
Here is the solution:
mkdir /etc/gcrypt
touch /etc/gcrypt/hwf.deny
cd /etc/gcrypt
sudo vi hwf.deny
(edit this file to read "all" without quotes on line 1
Save.
This will solve the issue.

Cannot uninstall Docker Desktop via Chocolatey

I've installed Docker 2.4 quite some time ago using Chocolatey (my OS is Win 10). Since updating Docker using choco upgrade all always failed, I did the updates manually via the Docker itself (right-click → Check for Updates → etc.). Now I'm on version 3.2.
Since I want to get rid of this manual update process, I wanted to uninstall Docker from Chocolatey. But executing choco uninstall docker-desktop fails with ERROR: Exception calling "GetFullPath" with "1" argument(s): "Illegal characters in path.".
Of course, I could uninstall Docker the usual Windows way. But how would I remove Docker from Chocolatey so that I can do a fresh install?
I was able to solve the issue by manually uninstalling Docker with default Windows tools.
Afterwards, I deleted the folder C:\ProgramData\chocolatey\lib\docker-desktop. This resulted in a clean environment when it comes to Docker, because Chocolatey seems to maintain all package-related things in the corresponding C:\ProgramData\chocolatey\lib\<<package>> folder.
Finally, I could install Docker again via choco install docker-desktop.

Neo4j Start Error: /var/run/neo4j/neo4j.pid: No such file or directory

After upgrading from Neo4j 3.0 to 3.1 (and subsequently 3.2), I get the following error after running sudo neo4j start:
/usr/share/neo4j/bin/neo4j: line 411: /var/run/neo4j/neo4j.pid: No such file or directory
Nonetheless, Neo4j is actually running after running this command.. However, I cannot then stop Neo4j afterwards with sudo neo4j stop, as there is no PID.
How can I fix this?
Notes:
I upgraded using sudo apt upgrade
It is possible to get around this issue by doing a sudo mkdir /var/run/neo4j beforehand, but was hoping there might be a more effective solution.
When using the installation package you should not start/stop with the neo4j script, but use the installed service. Depending on your Ubuntu version that is
sudo service neo4j {start|stop|restart}
or
sudo systemctl {start|stop|restart} neo4j
Check http://neo4j.com/docs/operations-manual/current/installation/linux/debian/ and http://neo4j.com/docs/operations-manual/current/installation/linux/systemd/ for more information.
Hope this helps,
Tom
P.S. Note that starting/stopping without using the service may have started Neo4j with the wrong user (root instead of neo4j) and files may therefore have the wrong ownership now !

How to designate specific versions of e.g. Ubuntu containers?

I just had my dockerized app not able to build for a day because apparently the "ubuntu:14.04" image still gets revved over time, and a newer OS level package version sabotaged me (this was unexpected - I'm careful to only apt-get install, pip install, etc. hardcoded versions of package so that I know when they change). Is there a way to control how/when I'm getting "newer 14.04's"? Not a desktop hack, I need it to work on the build server too when I submit my app to build.
Ubuntu publish dated tags to the registry.
$ docker run ubuntu:trusty-20160526 cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.4 LTS"

How to install docker-engine using docker binary without internet connection

I have downloaded docker binary version 1.8.2 and copied that to my backup server (centos server) which doesn't have internet connectivity. I have marked this as executable and started the docker daemon as mentioned in [https://docs.docker.com/engine/installation/binaries/][1]. But it doesn't seem to get installed as a docker service. For all the commands, I have to execute as sudo ./docker-1.8.2 {command}. Is there a way to install docker-engine as a service? Currently sudo docker version shows command not found. I'm a newbie to docker setup. Please advise.
Why not download the rpm package (there are also centos 6 packages), copy to USB stick and then to your server and simply install it with rpm command and that's it. That way you'd get the same installation as if you were to run yum.
Of course you may have some dependencies missing, but you could download all of these as well.
Firstly, if you're downloading bare binaries on an enterprise linux, you're probably doing things in a very bad way. Immediately, you're breaking updates and consistency, and leaving your system in a risky, messy state.
Try using yumdownloader --resolve to get the docker installable and anything it needs.
A better option may be to mirror the installation artifacts, and grab it from the local mirror, but that's beyond the scope if you don't do this already.

Resources