apt-key: line 352: comm: command not found - yocto

I am building a linux image using yocto which support deb package manager(apt-get). I created the repo with packages and i want to authorize this repo to my target machine. i followed these steps for that purpose. I created the keyFile successfully for the server (host). and when transfer this keyFile to my target and execute apt-key add keyFile, it promotes me the error
/usr/bin/apt-key: line 352: comm: command not found
i use yocto pyro 17.0.1 and i built for core-image-sato plus adding the recipe gnupg which exist in meta/recipes-support/gnupg
Why this error ?

Looks like the dependency on comm is missing. I believe this is part of coreutils, so add that to the image.
If that fixes it then a patch would be appreciated.

Related

How to build and install wal2json without also installing the package postgresql-server-dev on Debian 9?

I'm trying to stream data automatically from PostgreSQL 10 to Kafka using debezium together with the logical decoding plugin, wal2json.
I followed all the instructions on how to build and install the plugin from this link by running these command lines:
$ git clone https://github.com/eulerto/wal2json.git
$ cd wal2json
$ PATH=/usr/lib/postgresql/10/bin:$PATH
$ USE_PGXS=1 make
$ USE_PGXS=1 sudo make install
Yet, the steps for installation include this command line: USE_PGXS=1 make and it requires the installation of this package
sudo apt-get install postgresql-server-dev-10
else, I get the following error
Makefile:10: /usr/lib/postgresql/11/lib/pgxs/src/makefiles/pgxs.mk: No such file or directory
make: *** No rule to make target '/usr/lib/postgresql/11/lib/pgxs/src/makefiles/pgxs.mk'. Stop.
In fact, I am not allowed to install the package postgresql-server-dev-10 for personal reasons.
Thus, is there any way to install wal2json without installing that package or without using the command make?
Thank you.

Couldn't open file /packages/repodata/repomd.xml

I am using Redhat Linux server and trying to install the MongoDB on it.
I am following steps given in the link: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/
Step 1: Create a /etc/yum.repos.d/mongodb-org-4.0.repo file so that you can install MongoDB directly, using yum.
sudo nano /etc/yum.repos.d/mongodb-org-4.0.repo
Step 2: Copy and paste below code in the newly created file.
[mongodb-org-4.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc
Step 3: To install a specific release of MongoDB, specify each component package individually and append the version number to the package name, as in the following example:
sudo yum install -y mongodb-org
After all this I am getting an error given below:
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
file:///packages/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /packages/repodata/repomd.xml"
Trying other mirror.`
One of the configured repositories failed (local),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:`
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=localrepo ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable localrepo
or
subscription-manager repos --disable=localrepo
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=localrepo.skip_if_unavailable=true
failure: repodata/repomd.xml from localrepo: [Errno 256] No more mirrors to try.
file:///packages/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /packages/repodata/repomd.xml"
Server OS
NAME="Red Hat Enterprise Linux Server"
VERSION="7.3 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="7.3"
PRETTY_NAME="Red Hat Enterprise Linux"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.3:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.3
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.3"
I already followed steps below but these are not working in my case:
sudo rm -rf /etc/yum.repos.d/mongodb-org-4.0.repo
sudo yum clean all
How could i resolve this error?
Based on your error message it looks like you had a nameserver problem, which can involve a variety of solutions as this answer from redhat.com describes. My mongodb-org-4.0.repo file looks just like yours except with version 4.4 and everything worked fine. Well not at first that's how I found this post, but my problem was a blank space I accidentally inserted at the end of the mongodb-org-4.4.repo file.
I found this Unix & Linux Stack Exchange post with some possible fixes, one of which is updating to the latest CentOS. This ServerFault post also had an Errno 14 error message like you're seeing, but this solution was to disable SELinux.
you should check with baseurl in /etc/yum.repos.d/mongodb-org-4.0.repo file. we can also change the releaseserver version in baseurl.
Here is my /etc/yum.repos.d/mongodb-org-4.0.repo file
[mongodb-org-4.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/7/mongodb-org/4.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc
It works for me.

error: SERVER does not appear in AM_CONDITIONAL

I am trying to install Lustre on CentOS 7. I followed this link. When I try to run sh ./autogen.sh to generate the configure script I get the above error as illustrated below.
[root#localhost lustre-release]# sh ./autogen.sh
configure.ac:10: installing 'config/config.guess'
configure.ac:10: installing 'config/config.sub'
configure.ac:12: installing 'config/install-sh'
configure.ac:12: installing 'config/missing'
autoMakefile.am:127: error: SERVER does not appear in AM_CONDITIONAL
libcfs/libcfs/autoMakefile.am: installing 'config/depcomp'
Does anyone know how I can resolve this?
To build lustre from git use "autogen.sh" in the top level directory to setup the build environment:
$ bash autogen.sh
libcfs/libcfs/autoMakefile.am: installing 'config/depcomp'
$
Did you try downloading a pre-built package from https://downloads.whamcloud.com/public/lustre/ ? That is usually the easiest compared to building your own.
If you want to build your own Lustre code, which version of the source are you using? The latest code is available at git.whamcloud.com. Most users should use the LTS release (b2_10 branch currently), but if you are doing new development you should use the master branch.

Unable to install docker on Ubuntu server

I am unable to install docker on Ubuntu server.
The Error:
1.Failed to fetch https://download.docker.com/linux/ubuntu/dists/xenial/InRelease Unable to find expected entry 'stable/source/Sources' in Release file (Wrong sources.list entry or malformed file)
2.Failed to fetch http://ppa.launchpad.net/spring/ppa/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found
3.Some index files failed to download. They have been ignored, or old ones used instead.
My sources.list file looks like :
deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable
deb-src [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable
Also I am trying to install docker in virtual environment within Ubuntu server and above sources.list file in sources.list file within root folder.
I am trying to install docker as perquisite for my hyper ledger network set up?
Looks like docker doesn't have Sources. But you are looking for binaries anyway. So remove the deb-src line.
The second errormust come from a different sources.list file, check /etc/apt/sources.list.d/, too.
But both of these aren't stopping you. The missing index files will simply be ignored. They aren't stopping you from installing docker so your problem must be something else not stated in the question.
Remove all docker entries from /etc/apt/sources.list and also delete all /etc/apt/sources.list.d/docker*
Then simply use this script as root:
curl https://get.docker.com | bash
Or as user:
curl https://get.docker.com | sudo bash
Then install it via edited script (deleted docker install)
curl https://gist.githubusercontent.com/Razikus/6b61af8c69e563d587201c34f5c66568/raw/5608cdb81e33650b70ac934e261bbd5410269f7a/prereqs-ubuntu.sh | bash
According to comment, differences between original and changed:
Check diff from CLI:
diff <(curl https://hyperledger.github.io/composer/unstable/prereqs-ubuntu.sh) <(curl https://gist.githubusercontent.com/Razikus/6b61af8c69e563d587201c34f5c66568/raw/5608cdb81e33650b70ac934e261bbd5410269f7a/prereqs-ubuntu.sh)
It will be faster than searching for error

gdcmanon - Requested cryptoraphic library not configured

I am using gdcmanon to anonimize dicom files like the following:
LD_LIBRARY_PATH=../lib ./gdcmanon --certificate CA_cert.cer -e ./dump ./dump/anon
But it gives the following error:
Error: In /home/travis/build/malaterre/GDCM/Source/Common/gdcmCryptoFactory.cxx, line 61, function static gdcm::CryptoFactory* gdcm::CryptoFactory::GetFactoryInstance(gdcm::CryptoFactory::CryptoLib)
No crypto factory registered with id 1
Requested cryptoraphic library not configured.
How can I solve this?
The error is because of binaries you use, it looks like SSL dependencies are not satisfied.
As a solution (workaround?), you can get the binaries via apt system. For Ubuntu 16.04 Xenial distribution, there is version 2.6.3 of libgdcm-tools package.
Another possibility is to compile gdcm from scratch, but you need development files of OpenSSL (apt install libssl-dev). Moreover, to use anonymisation with certificates, in CMake system set GDCM_USE_SYSTEM_OPENSSL=YES.