lack MOSQ_1.5 for mosquitto - mqtt

I am using mosquitto as one of my project tool. After i successfully compile (make binary) mosquitto via source code and try to run mosquitto_sub/pub, its shows that
./mosquitto_sub: /usr/lib/i386-linux-gnu/libmosquitto.so.1: version `MOSQ_1.5' not found (required by ./mosquitto_sub)
while Mosquitto and Mosquitto_psswd is able is run without any problem. Besides, my mosquitto version is 1.5.
I have no idea about this problem.
Any Help appreciated .

It sounds like you have an earlier version of mosquitto installed and it's libraries are on the system path.
Make sure you have uninstalled any earlier versions of mosquitto installed on the machine.
Also make sure you have run make install as root in your build directory to copy the libraries to the correct locations

I had a similar issue building on rpi model B+ using GNU make 4.2.1 and cc (Raspbian 8.3.0-6+rpi1) 8.3.0
Error reported: ./mosquitto_sub: /usr/lib/i386-linux-gnu/libmosquitto.so.1: version `MOSQ_1.6' not found (required by ./mosquitto_sub)
Note: I left the existing distribution in place so that I could leverage off the systemd mosquitto.service that gets installed with the debian packages mosquitto and mosquitto-clients.
Resolution:
mkdir proj
git clone https://github.com/eclipse/mosquitto.conf
cd mosquitto
# my build failed on master branch, so I picked a tag that worked for me
git checkout -b 1.6.9 tags/1.6.9
make WITH_WEBSOCKETS=yes WITH_DOCS=yes WITH_SRV=yes
# overwrite the existing binaries
sudo make install
sudo ldconfig
# verify that the newly installed binaries have overwritten the originals.
mosquitto --help|grep -w 'mosquitto version'
mosquitto_pub --help|grep -w 'mosquitto_pub version'
mosquitto_sub --help|grep -w 'mosquitto_sub version'

Related

Docker rootless mode setup tool script can't find slirp4netns binary

I am trying to set up Docker rootless mode on Ubuntu 18.04, using the dockerd-rootless-setuptool.sh script. But I'm struggling to get the script to find the slirp4netns binary I downloaded (slirp4netns provides user-mode networking for unprivileged network namespaces). On Ubuntu 20 this is installable as a package using apt, but for lower Ubuntu versions a pre-built binary is provided here.
I am running the script (as non-root) with:
dockerd-rootless-setuptool.sh install
But it complains:
Either slirp4netns (>= v0.4.0) or vpnkit needs to be installed
I have downloaded the latest stable binary for slirp4netns (v1.1.12) as per the instructions:
curl -o slirp4netns --fail -L https://github.com/rootless-containers/slirp4netns/releases/download/v1.1.12/slirp4netns-$(uname -m)
chmod +x slirp4netns
I moved the binary (as root) to /usr/local/lib. What am I doing wrong? Do I need to update an environment variable? I don't really want to upgrade my entire OS just to get a single library.
Thanks.
It was my own stupidity. As the person says in the comment to my question, all I needed to do was to move the binary to /usr/local/bin. I had assumed /usr/local/lib was on PATH, but it wasn't.

./prereqs-ubuntu.sh Error: Ubuntu focal is not supported

I'm trying to use composer and for the same I'm using the below command for installation.
curl -O https://hyperledger.github.io/composer/latest/prereqs-ubuntu.sh
chmod u+x prereqs-ubuntu.sh
These above commands successfully executed.
But when I executed this command (./prereqs-ubuntu.sh) then I'm getting below error
Terminal Throws Error ///Ubuntu focal is not supported
Please help
Hyperledger Composer Installation
I also find this kind of error during Hyperledger Composer installation this problem mainly depends on the Ubuntu version.
Steps to overcome this problem.
upgrade ubuntu version as per your ubuntu versoin please follow:
https://www.fosslinux.com/38303/how-to-upgrade-to-ubuntu-20-04-lts-focal-fossa.htm
open file prereqs-ubuntu.sh with your compatible editor
update line:
#Array of supported versions
declare -a versions=('trusty' 'xenial' 'yakkety', 'bionic');
with
# Array of supported versions
declare -a versions=('trusty' 'xenial' 'yakkety', 'bionic', 'focal');
After saving this file
Run command: ./prereqs-ubuntu.sh
I hope this problem will resolve if anything please feel free to write.

How to install VS Code extensions in a Dockerfile?

Is there a way to install VS Code extensions in a Dockerfile?
Apparently, while most browser-based VS Code forks (including openvscode-server) do not permit headless installation of VS Code extensions (as seen from my other answer), it is possible to do such automated installs using docker build in one of them: Code Server (code-server), like in this sample Dockerfile:
FROM ubuntu:22.04
RUN apt update && apt install -y curl
# install VS Code (code-server)
RUN curl -fsSL https://code-server.dev/install.sh | sh
# install VS Code extensions
RUN code-server --install-extension redhat.vscode-yaml \
--install-extension ms-python.python
Relevant fragment of the docker build log:
[..]
---> Running in 59eea050a2db
[2022-11-13T10:13:58.762Z] info Wrote default config file to ~/.config/code-server/config.yaml
Installing extensions...
Installing extension 'redhat.vscode-yaml'...
Installing extension 'ms-python.python'...
Extension 'redhat.vscode-yaml' v1.10.1 was successfully installed.
Extension 'ms-python.python' v2022.16.1 was successfully installed.
[..]
Per the VS Code Documentation, the extensions property is specific to VS Code and can only be configured using .devcontainer.
The best you can do is if the extension has a CLI, you can install that. For example,
RUN npm install prettier -D --save-exact
Then use npx:
npx prettier --check .
This is sadly disallowed by design, as confirmed by this error message you will see in your docker build log when you attempt to run code --install-extension or openvscode-server --install-extension:
Command is only available in WSL or inside a Visual Studio Code terminal.
This is also confirmed (and tagged) as being as designed by one of VS Code Remote devs in this GitHub issue:
This is correct the 'vs code server CLI' is only available from the integrated terminal.
So VS Code Remote or even openvscode-server make it impossible to automate installs of first- or third-party extensions for this popular Microsoft IDE, unless you run their custom terminal inside their closed-source IDE, which normally entails buying a license for their GUI-based closed-source operating system as well;)

Installing Informix CSDK in an Ubuntu Docker container

I'm trying to install ibm.csdk.4.50.FC3.LNX in a Docker container based on Ubuntu 18.
I run in the container the installation file as follows:
root#mycontainer:/usr/src/ibm.csdk.4.50.FC3.LNX# ./installclientsdk -i console
But I get this error:
One or more prerequisite system libraries are not installed on your
computer. Install libdl.so.2, libcrypt.so.1, libpam.so.0,
libstdc++.so.6, libm.so.6, libgcc_s.so.1, libc.so.6, libncurses.so.5
and then restart the IBM Informix installation program.
The installation cannot succeed until the minimum requirements are
met. For more information about the prerequisites, see your
Installation Guide or check with your System Administrator.
However those files are already in the container in the following paths:
/lib/x86_64-linux-gnu/libdl.so.2
/lib/x86_64-linux-gnu/libcrypt.so.1
/lib/x86_64-linux-gnu/libpam.so.0
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
/lib/x86_64-linux-gnu/libm.so.6
/lib/x86_64-linux-gnu/libgcc_s.so.1
/lib/x86_64-linux-gnu/libc.so.6
/lib/x86_64-linux-gnu/libncurses.so.5
How can I install it?
Running apt install unixodbc-dev seems fixing.
You might want to install also unixodbc
We have similar issue where we are running shell script which runs dbaccess inside the docker container. but as we run the docker as root user it is trying to use root user to connect to the informix db server. is there a way we can configure user name and password for dbaccess to use the configured userId instead of root.

There are older versions of Google Cloud Platform tools: Docker

After updating gcloud I get this warning, but how do I do it(Should I remove Docker)?
WARNING: There are older versions of Google Cloud Platform tools on your system PATH.
Please remove the following to avoid accidentally invoking these old tools:
/Applications/Docker.app/Contents/Resources/bin/kubectl
I have this in my .zshrc:
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/Users/<NAME>/google-cloud-sdk/path.zsh.inc' ]; then source '/Users/<NAME>/google-cloud-sdk/path.zsh.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/Users/<NAME>/google-cloud-sdk/completion.zsh.inc' ]; then source '/Users/<NAME>/google-cloud-sdk/completion.zsh.inc'; fi
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
This happens because docker-for-mac installs a bin for kubectl, and gcloud-sdk also installs another bin with gcloud components install kubectl.
My recommendation is to uninstall kubectl as component from gcloud, overwrite the symlink from docker-for-mac, and only use the homebrew installed bin.
Try this commands:
gcloud components remove kubectl
brew install kubernetes-cli
brew link --overwrite kubernetes-cli
TLDR
/usr/local/bin/kubectl is a link installed by Docker: ls -l /usr/local/bin/kubectl => /usr/local/bin/kubectl -> /Applications/Docker.app/Contents/Resources/bin/kubectl. Removing the link has no side effects and solves the conflict:
rm /usr/local/bin/kubectl
Justification
The conflict is with the Docker-provided version of kubectl so it makes sense to check what Docker docs have to say about it. https://docs.docker.com/desktop/kubernetes/#use-the-kubectl-command
Extract:
If you installed kubectl using Homebrew, or by some other method, and experience conflicts, remove /usr/local/bin/kubectl.
Here is my case you can refer to. After running gcloud components update, I got this warning:
WARNING: There are older versions of Google Cloud Platform tools on your system PATH.
Please remove the following to avoid accidentally invoking these old tools:
/usr/local/Cellar/kubernetes-cli/1.10.2/bin/kubectl
I check this tool using brew list
☁ issue [master] brew list
coreutils gdbm git-lfs icu4c kops kubectx libpng mtr openssl python#2 sqlite tree wxmac
erlang geoip git-redate jpeg kube-ps1 kubernetes-cli libtiff node pcre readline telnet watchman
After reading the doc. I decided to uninstall kubernetes-cli and its dependencies kops, kube-ps1, and kubectx to avoid the conflicts.
☁ issue [master] brew uninstall kops kube-ps1 kubectx
Uninstalling /usr/local/Cellar/kops/1.9.0... (5 files, 129.8MB)
Uninstalling /usr/local/Cellar/kube-ps1/0.6.0... (6 files, 29.0KB)
Uninstalling /usr/local/Cellar/kubectx/0.5.0... (12 files, 27.8KB)
☁ issue [master] brew uninstall kubernetes-cli
Uninstalling /usr/local/Cellar/kubernetes-cli/1.10.2... (178 files, 52.8MB)
☁ issue [master] gcloud components update
All components are up to date.
This warning is gone.
I just went into the Docker file's bin folder and moved the kubectl to the trash.
Do echo $PATH and check which folder takes precedence. In my case it is like .../Users/myname/google-cloud-sdk/bin:/usr/local/bin:/usr/bin:.... Here the kubectl in gcloud is actually before the kubectl from Docker Desktop (which is in /usr/local/bin/kubectl) so there is no problem. If this is also your case you don't need to do anything.
Of course, if you want to completely remove confusion you can just delete the link /usr/local/bin/kubectl -> /Applications/Docker.app/Contents/Resources/bin/kubectl, or rename it.
Update:
In the recent docker desktop releases they actually provided another link /usr/local/bin/kubectl.docker -> /Applications/Docker.app/Contents/Resources/bin/kubectl to differentiate it from other kubectl so it is not a bad idea to just simply delete the link /usr/local/bin/kubectl -> /Applications/Docker.app/Contents/Resources/bin/kubectl

Resources