Kubernetes Pod - External library dependency - kubernetes

I'm using the Vault's Kubernetes Helm Chart.
Before proceeding, I'd like to mention that my issue is extremely similar to this one, but it didn't help.
So, inside Vault, I need to load a custom plugin, which has two dependencies: libpbc and libgmp.
While trying to install the plugin, I get this error:
* fork/exec /vault/plugins/plugin_name: no such file or directory
which is not normal, for the simple reason that everything seems okay (the plugin_directory (a Vault dependency) exists, the plugin is indeed under /vault/plugins etc).
So, by investigating, I found out that there is a big issue.
Executing ldd /vault/plugins/*plugin_name*, I get:
Error loading shared library libpbc.so.1: No such file or directory (needed by vault/plugins/plugin_name)
Error loading shared library libgmp.so.10: No such file or directory (needed by vault/plugins/plugin_name)
libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7eff0c4ba000)
libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7eff0c4ba000)
Error relocating vault/plugins/plugin_name: pbc_param_init_a1_gen: symbol not found
Error relocating vault/plugins/plugin_name: pbc_param_init_e_gen: symbol not found
Error relocating vault/plugins/plugin_name: pbc_cm_search_d: symbol not found
...
What I have already tried:
Moving the libraries inside the pod and under /usr/local/lib. No. Error: tar: can't create symlink 'libpbc.so' to 'libpbc.so.1.0.0': Permission denied
Moving the libraries "anywhere" and exporting the LD_LIBRARY_PATH. Again, no. Not working (Expected)
Any other thing that came to my mind and got me a "Permission denied" error.

Issue solved.
I created a custom Vault image and in the Dockerfile I made it to include all the dependencies
RUN apk add build-base gmp-dev ...
For the libpbc, I wget the files, decompress them and then
./configure
make
make install

Related

When I try to upload my package to PyPI why do I get an upload failed?

The upload failed and I see there is a warning that MANIFEST.in does not exist and standard file not found: should have one of README, README.txt, README.rst.
Can someone please help? I'm not sure if I need to create the manifest template and standard readme files or if there's something wrong with the code I'm using:
C:\Users\Sean\Desktop\Projects\Head_First_Python\nester>python setup.py sdist upload
running sdist
running check
warning: sdist: manifest template 'MANIFEST.in' does not exist (using default file list)
warning: sdist: standard file not found: should have one of README, README.txt, README.rst
writing manifest file 'MANIFEST'
creating nester-1.0.0
making hard links in nester-1.0.0...
hard linking nester.py -> nester-1.0.0
hard linking setup.py -> nester-1.0.0
Creating tar archive
removing 'nester-1.0.0' (and everything under it)
running upload
Submitting dist\nester-1.0.0.tar.gz to https://upload.pypi.org/legacy/
Upload failed (403): Invalid or non-existent authentication information. See https://pypi.org/help/#invalid-auth for details
error: Upload failed (403): Invalid or non-existent authentication information. See https://pypi.org/help/#invalid-auth for details
C:\Users\Sean\Desktop\Projects\Head_First_Python\nester>

How to configure linaro-gcc

Now i'm using gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf and using eclipse to cross-compile. But when build, i get error like
home/osboxes/artik5/opt/toolchains/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.5.0/../../../../arm-linux-gnueabihf/bin/ld: cannot find crt1.o: No such file or directory
/home/osboxes/artik5/opt/toolchains/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.5.0/../../../../arm-linux-gnueabihf/bin/ld: cannot find crti.o: No such file or directory
/home/osboxes/artik5/opt/toolchains/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.5.0/../../../../arm-linux-gnueabihf/bin/ld: cannot find /lib/arm-linux-gnueabihf/libpthread.so.0
makefile:209: recipe for target 'hc' failed
/home/osboxes/artik5/opt/toolchains/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.5.0/../../../../arm-linux-gnueabihf/bin/ld: cannot find /usr/lib/arm-linux-gnueabihf/libpthread_nonshared.a
Anyone help me fix this bug. I find crt1.o, crti.o, libpthread.so.0 and libpthread_nonshared.a in /home/osboxes/artik5/opt/toolchains/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/libc/usr/lib
rt1.o, crti.o and crtn.o and libc.a all come with your glibc.
you need use --sysroot option to tell gcc where to search for binaries created by glibc.

Getting cp: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory error

I'm getting below error in centOS. This started happens when in /lib64/ I renamed libc.so.6 as libc.so.6.backup. Now I'm unable to do anything on VM. None of cp, ls and no other commands are working. Please help me to get this fixed.
cp: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
grep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
You really should not try to replace glibc on a system, expect by upgrading it to a version supplied by the distribution, using the distribution package manager.
That being said, on CentOS systems, /usr/sbin/sln is statically linked and can be used to add a symbolic link, with something like this:
/usr/sbin/sln /lib64/libc.so.6 /lib64/libc.so.6.backup

Error when running yeoman init

I'm getting the following error when I run `yeoman init angularĂ¹, although the angular part shouldn't matter, since I got the same error:
create test/lib/angular-mocks.js
<WARN> Unable to create directory "/Users/myuserfolder/test/lib" (Error code: ENOTDIR). Use --force to continue. </WARN>
it seems to be trying to create a file in my home folder, which is weird, becuse I cd'd into a folder designated for my project. What could be going on here?
That is a known bug caused by you having a Gruntfile in your home directory.

How do I install XML::Xerces?

Please see Part 2 which list latest errors while installing module continued post.
Normally when I try to install XML::Xerces CPAN module using standard cpan> install XML::Xercers than I get following error message after some processing:
XML-Xerces-2.7.0-0/samples/SEnumVal.pl
...
XML-Xerces-2.7.0-0/postSource.pl
XML-Xerces-2.7.0-0/xerces-headers.txt
Removing previously used /home/adoshi/.cpan/build/XML-Xerces-2.7.0-0
CPAN.pm: Going to build J/JA/JASONS/XML-Xerces-2.7.0-0.tar.gz
WARNING
You have not defined any of the following environment variables:
XERCESCROOT
XERCES_LIB
XERCES_INCLUDE
These instruct me how to locate the Xerces header files, and the
Xerces dynamic library. If they are installed in a standard system
directory, I will located them without those variables.
However, if they have been installed in a non-standard location
(e.g. '/usr/include/xerces'), then I will need help. See the README
for more info.
Proceeding ...
WARNING
You have not defined any of the following environment variables:
XERCESCROOT
XERCES_CONFIG
Without these I cannot find the config.status file that was used to
build your Xerces-C library. Without that file, I may not be able to properly
build the C++ glue files that come with Xerces.pm.
Proceeding anyway ...
Couldn't find XercesVersion.hpp in your include directory at Makefile.PL line 1 88.
Running make test
Make had some problems, maybe interrupted? Won't test
Running make install
Make had some problems, maybe interrupted? Won't install
After Setting Enviornment Variables to /home/username/XML-Xerces-2.7.0-0/XML-Xerces-2.7.0-0/Xerces.pm, note here am not sure whether I should point my environment variable to Xerces.pm or Xerces.cpp or Xerces-extra.pm or Xerces.i, but for now am pointing environment variables to /home/username/XML-Xerces-2.7.0-0/XML-Xerces-2.7.0-0/Xerces.pm
After setting environment variables as mentioned and entering cpan>install XML::Xerces I get following message:
CPAN: Storable loaded ok
Going to read /home/username/.cpan/Metadata
Database was generated on Fri, 16 Oct 2009 18:27:06 GMT
Running install for module XML::Xerces
Running make for J/JA/JASONS/XML-Xerces-2.7.0-0.tar.gz
CPAN: Digest::MD5 loaded ok
CPAN: Compress::Zlib loaded ok
Checksum for /home/adoshi/.cpan/sources/authors/id/J/JA/JASONS/XML-Xerces-2.7.0-0.tar.gz ok
Scanning cache /home/adoshi/.cpan/build for sizes
XML-Xerces-2.7.0-0/
...
XML-Xerces-2.7.0-0/postSource.pl
XML-Xerces-2.7.0-0/xerces-headers.txt
Removing previously used /home/adoshi/.cpan/build/XML-Xerces-2.7.0-0
CPAN.pm: Going to build J/JA/JASONS/XML-Xerces-2.7.0-0.tar.gz
Using XERCES_LIB = /home/adoshi/XML-Xerces-2.7.0-0/XML-Xerces-2.7.0-0/Xerces.pm
using XERCES_CONFIG: /home/adoshi/XML-Xerces-2.7.0-0/XML-Xerces-2.7.0-0/Xerces.pm
- Found CXX =
- Found CXXFLAGS =
- Found LDFLAGS =
Couldn't find XercesVersion.hpp in your include directory at Makefile.PL line 188, <CONF> line 6823.
Running make test
Make had some problems, maybe interrupted? Won't test
Running make install
Make had some problems, maybe interrupted? Won't install
Note: I have tried downloading XML::Xercesand trying to again install it, both manually as well as using CPAN but am getting above mentioned error message.
What can be the possible reason and what can be suggested turn around to take care of this issue ?
Update: Even after building Xerces-C, XML::Xerces module is not building and am getting following error message.
[adoshi#upc01.dev XML-Xerces-2.7.0-0]$ perl Makefile.PL
Using XERCES_LIB = /adoshi/lib
Using XERCES_INCLUDE = /adoshi/include/xerces
WARNING
You have defined the XERCESCROOT variable, but the file:
XERCESCROOT/src/xercesc/config.status
does not seem to point to the config.status file that was used to
build your Xerces-C library. Without that file, I may not be able to
properly build the C++ glue files that come with Xerces.pm.
Proceeding anyway ...
Couldn't find XercesVersion.hpp in your include directory /adoshi/include/xerces at Makefile.PL line 188.
Update2Here is the error which am getting, it says there is somekind of version mismatch.
Using XERCES_LIB = /home/adoshi/XML-Parser/Parser2/xerces-c_2_8_0-hppa-hpux-acc_3(1)/xerces-c_2_8_0-hppa-hpux-acc_3/lib
Using XERCES_INCLUDE = /home/adoshi/XML-Parser/Parser2/xerces-c_2_8_0-hppa-hpux-acc_3(1)/xerces-c_2_8_0-hppa-hpux-acc_3/include
WARNING
You have defined the XERCESCROOT variable, but the file:
XERCESCROOT/src/xercesc/config.status
does not seem to point to the config.status file that was used to
build your Xerces-C library. Without that file, I may not be able to
properly build the C++ glue files that come with Xerces.pm.
Proceeding anyway ...
Using Xerces-C version info from /home/adoshi/XML-Parser/Parser2/xerces-c_2_8_0-hppa-hpux-acc_3(1)/xerces-c_2_8_0-hppa-hpux-acc_3/include/xercesc/util/XercesVersion.hpp
*** Version Mismatch ***
You are attempt to build XML::Xerces-2.7.0-0 using Xerces-C-2.8.0,
this will most likely fail, so I am aborting.
You must use Xerces-C-2.7.0
Here's a general rule: any environment variable that is named something like "ROOT" is asking for a directory, not a file.
However, it does not appear that you have installed the Xerces library, which is necessary before you install the perl module. I'll quote some portions of the output you provided, as the hint you missed as to what to do next:
"...These instruct me how to locate the Xerces header files, and the Xerces dynamic library..."
"Without these I cannot find the config.status file that was used to
build your Xerces-C library"
So, did you install Xerces-C? You'll have much better results installing the Perl module after that.
Did you try using the PPM to install XML::Xerces?