get the follow error info when "sudo apt install docker-compose" - docker-compose

insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package lvm2 (--configure): subprocess
installed post-installation script returned error exit status 1
Processing triggers for initramfs-tools (0.122ubuntu8.10) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-105-generic Errors
were encountered while processing: docker-ce lvm2 E: Sub-process
/usr/bin/dpkg returned an error code (1)
docker version: Docker version 18.03.1-ce, build 9ee9f40
system version: Linux ci02-test 4.4.0-105-generic #128-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux

finally finished it by install docker-compose from docker.com

Related

VSCode | The editor cannot be opened due to an unexpected error

Goal: Get regular Bash and Git in Terminal working for Python projects in Visual Studio Code.
Anytime I launch, I see this error. I cannot open code or use Terminal.
Error Message:
The editor cannot be opened due to an unexpected error: No file system provider found for resource 'vscode-remote://wsl%2Bubuntu/...'
Update: Uninstalled WSL. I no longer have the below old Terminal output.
Terminal:
[2022-06-13 15:53:18.277] Resolving wsl+ubuntu, resolveAttempt: 1
[2022-06-13 15:53:18.361] Starting VS Code Server inside WSL (wsl1)
[2022-06-13 15:53:18.361] Extension version: 0.66.3
[2022-06-13 15:53:18.361] Windows build: 19044. Multi distro support: available. WSL path support: enabled
[2022-06-13 15:53:18.361] No shell environment set or found for current distro.
[2022-06-13 15:53:18.546] WSL daemon log file:
[2022-06-13 15:53:18.548] Probing if server is already installed: C:\WINDOWS\System32\wsl.exe -d Ubuntu -e sh -c "[ -d ~/.vscode-server/bin/c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5 ] && printf found || ([ -f /etc/alpine-release ] && printf alpine-; uname -m)"
[2022-06-13 15:53:19.023] Probing result: x86_64
[2022-06-13 15:53:19.024] No server install found in WSL, needs linux-x64
[2022-06-13 15:53:19.024] Downloading server on client side to C:\Users\dabell\AppData\Local\Temp\vscode-remote-wsl\c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5\vscode-server-stable-linux-x64.tar.gz.
[2022-06-13 15:53:19.024] https://update.code.visualstudio.com/commit:c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/server-linux-x64/stable
[2022-06-13 15:53:26.719] Unable to download server on client side: Error: Request downloadRequest failed with message: getaddrinfo ENOTFOUND update.code.visualstudio.com. Will try to download on WSL side.
[2022-06-13 15:53:26.721] Launching C:\WINDOWS\System32\wsl.exe -d Ubuntu sh -c '"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5 stable code-server .vscode-server --host=127.0.0.1 --port=0 --connection-token=1433349295-3472956524-2784734323-674824766 --use-host-proxy --without-browser-env-var --disable-websocket-compression --accept-server-license-terms --telemetry-level=all'
[2022-06-13 15:53:27.103] Setting up server environment: Looking for /home/danielbellhv/.vscode-server/server-env-setup. Not found.
[2022-06-13 15:53:27.104] WSL version: 4.4.0-19041-Microsoft Ubuntu
[2022-06-13 15:53:27.104] Updating VS Code Server to version c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5
[2022-06-13 15:53:27.104] Removing previous installation...
[2022-06-13 15:53:27.104] Installing VS Code Server for x64 (c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5)
[2022-06-13 15:53:27.104] Downloading:
[2022-06-13 15:53:37.329] 100%
[2022-06-13 15:53:37.329] Failed
[2022-06-13 15:53:37.331] --2022-06-13 16:53:37-- https://update.code.visualstudio.com/commit:c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/server-linux-x64/stable
[2022-06-13 15:53:37.331] Resolving update.code.visualstudio.com (update.code.visualstudio.com)...
[2022-06-13 15:53:47.093] failed: Temporary failure in name resolution.
[2022-06-13 15:53:47.093] wget: unable to resolve host address ‘update.code.visualstudio.com’
[2022-06-13 15:53:47.093] ERROR: Failed to download https://update.code.visualstudio.com/commit:c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/server-linux-x64/stable to /home/danielbellhv/.vscode-server/bin/c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5-1655135606.tar.gz
[2022-06-13 15:53:47.094] VS Code Server for WSL closed unexpectedly.
[2022-06-13 15:53:47.094] For help with startup problems, go to https://code.visualstudio.com/docs/remote/troubleshooting#_wsl-tips
[2022-06-13 15:53:47.116] WSL Daemon exited with code 0
This can be solved by restarting the WSL container's network.
Open Powershell from in Windows and type the following command:
Restart-Service LxssManager
I would advise saving it to a script such as restart-WSL-network.ps1 and setting up a shortcut to run this when it happens again.
I'm kind of late to the party, but I've just had this issue today. I only restarted Windows, and now it works fine!
Deleting the .vscode* folders in the home directory (in wsl) fixed the issue
running wsl --shutdown from windows command line and relaunch the vscode solved my issue.
I simply uninstalled and reinstalled WSL 2, from Windows Store.
You can via. command line, but I found using Windows Store to be more accessible / user friendly.

Fail to start Minikube on Debian

I installed Minikube on my Debian 10, but when I try to start it, I
get these errors:
$ minikube start
* minikube v1.25.2 on Debian 10.1
* Unable to pick a default driver. Here is what was considered, in preference order:
- docker: Not healthy: "docker version --format {{.Server.Os}}-{{.Server.Version}}" exit status 1: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/version: dial unix /var/run/docker.sock: connect: permission denied
- docker: Suggestion: Add your user to the 'docker' group: 'sudo usermod -aG docker $USER && newgrp docker' <https://docs.docker.com/engine/install/linux-postinstall/>
- kvm2: Not healthy: /usr/bin/virsh domcapabilities --virttype kvm failed:
error: failed to get emulator capabilities
error: invalid argument: KVM is not supported by '/usr/bin/qemu-system-x86_64' on this host
exit status 1
- kvm2: Suggestion: Follow your Linux distribution instructions for configuring KVM <https://minikube.sigs.k8s.io/docs/reference/drivers/kvm2/>
* Alternatively you could install one of these drivers:
- podman: Not installed: exec: "podman": executable file not found in $PATH
- vmware: Not installed: exec: "docker-machine-driver-vmware": executable file not found in $PATH
- virtualbox: Not installed: unable to find VBoxManage in $PATH
I added my user to the docker group using:
sudo usermod -aG docker $USER
and I insalled kvm without any apparent problems as far as I understand:
kvm --version
QEMU emulator version 3.1.0 (Debian 1:3.1+dfsg-8~deb10u1)
Copyright (c) 2003-2018 Fabrice Bellard and the QEMU Project developers
$ lsmod | grep kvm
kvm 729088 0
irqbypass 16384 1 kvm
$ sudo virsh list --all
Id Name State
-----------------------------
1 debian10-MK running
What could be the problem and solution then?
Thanks,
Tamar

Cannot start mongodb in Mac

In my mac 11.5.2, I wanted to install mongodb. I tried to install by brew install mongodb-community#3.2, Then brew services run mongodb-community#3.2 returned
Bootstrap failed: 5: Input/output error
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /usr/local/opt/mongodb-community#3.2/homebrew.mxcl.mongodb-community#3.2.plist` exited with 5.
And brew services shows
Name Status User Plist
mongodb-community#3.2 error SoftTimur /usr/local/opt/mongodb-community#3.2/homebrew.mxcl.mongodb-community#3.2.plist
nginx stopped
Could anyone help?

error while running the comannd 'psql' Error: You must install at least one postgresql-client-<version> package

When I run vagrant ssh and login successfully then try the ~$psql command, I get this error: Error: You must install at least one postgresql-client-<version> package.
I saw a similar question here and I ran this command:
~$ sudo apt-get install postgresql-client
The output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libpq5 postgresql-client-9.1
Suggested packages:
postgresql-9.1 postgresql-doc-9.1
The following NEW packages will be installed:
libpq5 postgresql-client postgresql-client-9.1
0 upgraded, 3 newly installed, 0 to remove and 66 not upgraded.
Need to get 1,057 kB/1,063 kB of archives.
After this operation, 3,448 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Err http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libpq5 amd64 9.1.5-0ubuntu12.04
404 Not Found [IP: 91.189.91.23 80]
Err http://security.ubuntu.com/ubuntu/ precise-security/main libpq5 amd64 9.1.5-0ubuntu12.04
404 Not Found [IP: 91.189.88.149 80]
Err http://security.ubuntu.com/ubuntu/ precise-security/main postgresql-client-9.1 amd64 9.1.5-0ubuntu12.04
404 Not Found [IP: 91.189.88.149 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/postgresql-9.1/libpq5_9.1.5-0ubuntu12.04_amd64.deb 404 Not Found [IP: 91.189.88.149 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/postgresql-9.1/postgresql-client-9.1_9.1.5-0ubuntu12.04_amd64.deb 404 Not Found [IP: 91.189.88.149 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
I tried the suggested fix missing too but didn't work.
How can I install a postgresql package successfully? And mainly how can I get the $psql command to give me the desired output showed in the picture?
(Edit) I tried the first answer's suggestion:
vagrant#precise64:~$ apt-get update
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
Then tried the solutions mentioned here :
vagrant#precise64:~$ ps aux | grep apt
vagrant 1144 0.0 0.2 11676 948 pts/0 S+ 18:59 0:00 grep --color=auto apt
I don't understand so I don't know what's next.
looks like you had some trouble installing several packages 404 Not Found.
Do sudo apt-get update and then retry the install.

Cannot launch emulator on Linux (Ubuntu 15.10)

I try to launch emulator but it outputs into log:
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
X Error of failed request: GLXBadContext
Major opcode of failed request: 155 (GLX)
Minor opcode of failed request: 6 (X_GLXIsDirect)
Serial number of failed request: 47
Current serial number in output stream: 46
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
X Error of failed request: GLXBadContext
Major opcode of failed request: 155 (GLX)
Minor opcode of failed request: 6 (X_GLXIsDirect)
Serial number of failed request: 47
Current serial number in output stream: 46
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 155 (GLX)
Minor opcode of failed request: 24 (X_GLXCreateNewContext)
Value in failed request: 0x0
Serial number of failed request: 33
Current serial number in output stream: 34
QObject::~QObject: Timers cannot be stopped from another thread emulator: WARNING: Increasing RAM size to 1GB
How to fix it? I read topics with similar errors but it doesn't help me.
Using the libstdc++.so.6 that is available in your system instead of the one bundled with the android sdk solves this issue.
The emulator has a switch -use-system-libs to do this.
~/Android/Sdk/tools/emulator -avd Nexus_5_API_23 -use-system-libs
Alternatively you can set the ANDROID_EMULATOR_USE_SYSTEM_LIBS environment variable to 1 for your user/system. This has the benefit of making sure that the emulator will work even if you launched it from within Android Studio.
More details: https://code.google.com/p/android/issues/detail?id=197254#c15
$ cd Android/Sdk/emulator/lib64/libstdc++
$ mv libstdc++.so.6 libstdc++.so.6.bak
$ ln -s /usr/lib64/libstdc++.so.6
it's worked for me
Take a look at
https://code.google.com/p/android/issues/detail?id=197254
in particular items #3 and #19. This is a workaround rather than a true solution, but it got me moving again. You will have to adjust the command for:
the location of the libstdc++.so.6 file on your system - I used locate libstdc++.so.6 to find this
the path to the emulator executable
the name of your emulator
so my command was
LD_PRELOAD='/usr/lib/x86_64-linux-gnu/libstdc++.so.6' ~/Android/Sdk/tools/emulator -netdelay none -netspeed full -avd Nexus_5_API_21
This then launches the emulator, and you can select it in the 'Device Chooser' dialogue when you run your app.
I have a similar error in Ubuntu 16.04 64-bit.
For me the answer #23 solution works great
https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Status%20Priority%20Owner%20Summary%20Stars%20Reporter%20Opened&groupby=&sort=&id=197254
$ cd $ANDROID_HOME/android-sdk-linux_x86/tools/lib64/libstdc++
$ mv libstdc++.so.6 libstdc++.so.6.bak
$ ln -s /usr/lib64/libstdc++.so.6 $ANDROID_HOME/android-sdk-linux_x86/tools/lib64/libstdc++
Use "Software" in the Emulated Performance Graphics option, in the AVD settings. Very simple solution.
i do this and it's working
cd ~/Android/Sdk/emulator/lib64/libstdc++
mv libstdc++.so.6 libstdc++.so.6.bak
ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 libstdc++.so.6
better locate your system default libstdc++.so.6 using the command
locate libstdc++.so.6
And Then Take a back up of the android sdk version of the file in ~/Android/Sdk/tools/lib64/libstdc++/
And create a soft link for libstdc++.so.6 with the same name in the above path replacing the existing one pointing to the default file in the system
This way we do not need restart the emulator every time from command line.
Try to change graphics option in Emulator settings:
I was also having a lot of problems to launch AVD on my machine. Struggled with using system libs, creating symlinks to local libraries, etc...
What really made it work for me was to install the nvidia drivers with
sudo apt install nvidia-340
My distro (note I'm not using Ubuntu 15.10):
$ uname -a
Linux ruapehu 4.4.0-38-generic #57-Ubuntu SMP Tue Sep 6 15:42:33 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/issue
Ubuntu 16.04.1 LTS \n \l
Make sure you check the nvidia package suitable for you, as Ubuntu offers different flavors. For instance:
$ sudo apt list "nvidia-[0-9][0-9][0-9]"
Listing... Done
nvidia-304/xenial 304.131-0ubuntu3 amd64
nvidia-331/xenial 340.96-0ubuntu3 amd64
nvidia-340/xenial,now 340.96-0ubuntu3 amd64 [installed]
nvidia-346/xenial 352.63-0ubuntu3 amd64
nvidia-352/xenial 361.42-0ubuntu2 amd64
nvidia-361/xenial,now 361.42-0ubuntu2 amd64
I tested the list in a bottom-up strategy, from 361 until I found one that worked (340, in my case).
Hope that helps.
In my case (Ubuntu 16.10 64-bit, Android Studio 2.3) libs were located in another place. So commands are:
/home/myusername/Android/Sdk/emulator/lib64/libstdc++
➜ libstdc++ ll
total 9,3M
-rwxr-xr-x 1 myusername myusername 4,6M мар 21 00:09 libstdc++.so.6
-rwxr-xr-x 1 myusername myusername 4,6M мар 21 00:09 libstdc++.so.6.0.18
➜ libstdc++ mv libstdc++.so.6 libstdc++.so.6.bak
➜ libstdc++ mv libstdc++.so.6.0.18 libstdc++.so.6.0.18.bak
➜ libstdc++ ln -s /usr/lib32/libstdc++.so.6 /home/myusername/Android/Sdk/emulator/lib64/libstdc++
➜ libstdc++ ln -s /usr/lib32/libstdc++.so.6.0.22 /home/myusername/Android/Sdk/emulator/lib64/libstdc++
➜ libstdc++ ll
total 9,3M
lrwxrwxrwx 1 myusername myusername 25 мар 29 13:18 libstdc++.so.6 -> /usr/lib32/libstdc++.so.6
-rwxr-xr-x 1 myusername myusername 4,6M мар 21 00:09 libstdc++.so.6.0.18.bak
lrwxrwxrwx 1 myusername myusername 30 мар 29 13:19 libstdc++.so.6.0.22 -> /usr/lib32/libstdc++.so.6.0.22
-rwxr-xr-x 1 myusername myusername 4,6M мар 21 00:09 libstdc++.so.6.bak
And now emulator is launched from AVD manager normally.
I had the similar problems with using i965_dri.so and swrast_dri.so, I wasn't able to change to software graphics in the GUI.
So I went to the emulator's folder (Show on Disk link in AVDM) and found the config.ini
Here I just changed the following line to stop it from using GPU:
hw.gpu.enabled=no
This is fixed in Android Emulator 27.2.9. See the first fix listed here:
https://developer.android.com/studio/releases/emulator#fixes
$ cd ~/Android/Sdk/emulator/lib64/libstdc++
$ mv libstdc++.so.6 libstdc++.so.6.bak
$ ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 libstdc++.so.6