How to check version of libpkcs11 on Solaris - solaris

As stated in subject. How to check in terminal which version of pkcs11 I've got on SunOS 5.11?
How is it possible to update this library? It is causing me some issues to my Java standalone application.
Thanks!

The libpkcs11 library is part of the Solaris 11 system/library package. You query the package and its version with this command:
$ pkg search -l /usr/lib/libpkcs11.so
INDEX ACTION VALUE PACKAGE
path link usr/lib/libpkcs11.so pkg:/system/library#0.5.11-0.175.2.0.0.42.2
Should you want to update it, you need to update Solaris 11 itself to a newer version (eg: 11.2 or a newer SRU)

Related

SBT fails with `String.class is broken`

sbt fails with a cryptic error on issuing any command (compile, assembly, clean or any other).
$ sbt --version
error: error while loading String, class file '/modules/java.base/java/lang/String.class' is broken
(class java.lang.NullPointerException/null)
I am on a machine running macOS, and sbt was installed via homebrew. I have tried upgrading to the latest versions of sbt (1.3.10), but the error still persists.
The issue is documented on the SBT Download page.
Homebrew maintainers have added a dependency to JDK 13 because they want to use more brew dependencies (brew#50649). This causes sbt to use JDK 13 even when java available on PATH is JDK 8 or 11. To prevent sbt from running on JDK 13, install jEnv or switch to using SDKMAN.
I was able to resolve the problem by using JDK 8 via jEnv.
Since sbt documents JDK 8 and 11 as compatible versions
We recommend AdoptOpenJDK JDK 8 or AdoptOpenJDK JDK 11
try controlling which JDK is used by sbt via -java-home setting which can be configured system-wide via sbtopts run configuration
/usr/local/etc/sbtopts
or per-project basis via
<project-root>/.sbtopts
For example, to configure JDK used by sbt in current project, try setting in .sbtopts
-java-home /Users/picard/.sdkman/candidates/java/current
This is what solved my problem on my Mac.
brew uninstall sbt
Install sdkman
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
Install sbt via sdk
sdk install sbt
I had the same issue recently. What worked for me is to install SDKMAN(https://sdkman.io/)
$ curl -s "https://get.sdkman.io" | bash
...
$ source "$HOME/.sdkman/bin/sdkman-init.sh"
...
After installation, I wanted to see what versions of Java I can install. So I simply run this command to list all the available versions of Java
sdk list java
Choose the version you want to install (recommend installing either 8 or 11 as mentioned above) and simply run the command with the identifier that specifies your version from the list
sdk install java 11.0.3.hs-adpt
After installation, it set the Java 11 to default on my system. I then ran the sbt command again and it worked.
If you are using SDKMAN then in some cases certain versions of Java (i.e. JDK) from different vendor might help.
E.g. I was using Amazon Correto JDK8 (version 8.332.08.1-amzn) and it could not properly build my sbt project in IntellIJ IDEA, so I've switched to using Zulu's JDK8 (version 8.0.332-zulu) as default java version.
Hope this helps and good luck. :)

Chaquopy upgrade pip

While running the latest chaquopy I am running into the error:
Collecting tensorflow==1.13.1
Could not find a version that satisfies the requirement tensorflow==1.13.1 (from versions: 1.10.1)
No matching distribution found for tensorflow==1.13.1
I am wondering if the internal chaquopy pip is too old and needs to be upgraded. How is this possible?
The issue isn't the version of pip, it's the version of TensorFlow. Try changing your project to use version 1.10.1 instead, as the message suggests.

How to generate uuid in solaris 11?

How to generate UUID in solaris 11?
In Solaris 10 i was using makeuuid command to generate.
I can not find it in solaris 11 while it exist as per oracle documents
https://docs.oracle.com/cd/E23824_01/html/821-1462/makeuuid-1m.html
but I can't find it, also I can not find the container package.
You can also use the very small Python program below. Would this help?
$ cat bin/uuidgen.py
#!/usr/bin/python
import uuid
print(uuid.uuid4())
$ uuidgen.py
c4f248e9-c398-4054-9208-6badd366f857
Searching for makeuuid in all Solaris 11 packages:
# pkg search -flr makeuuid
INDEX ACTION VALUE PACKAGE
basename file usr/bin/makeuuid pkg:/system/management/product-registry#0.5.11-0.151.0.1
OK, what about that package?
# pkg info -r pkg:/system/management/product-registry
Name: system/management/product-registry
Summary:
State: Not installed (Obsolete)
Publisher: solaris
Version: 0.5.11
Build Release: 5.11
Branch: 0.171
Packaging Date: August 1, 2011 04:48:45 PM
Size: 5.45 kB
FMRI: pkg://solaris/system/management/product-registry#0.5.11,5.11-0.171:20110801T164845Z
Note that the package is obsolete. You can try force-installing it, but the Solaris 11 package system might remove it on your next update.
I'm not sure why it's obsolete, but the man page you linked is part of the DCE/RPC OpenGroup specification from 1997. The version string 0.5.11-0.151.0.1 seems to indicate an old OpenSolaris/Nevada package, likely from SNV version 151.
Note that makeuuid is not in the Solaris 11.3 man pages section 1M.
If you really want that makeuuid binary, you should be able to download the package locally following this procedure: https://serverfault.com/a/348265/283415 Once you have the package on your local system, you should be able to take it apart and pull out the makeuuid binary. Note that grabbing the binary from the package won't install any dependencies, and the makeuuid binary from that old package may not work or it might work improperly on your later system.

GLIBC_2.7 not found

I am getting the following error when trying to run several executables:
/lib/libc.so.6: version `GLIBC_2.7' not found (required by .tools/bridge/bridge)
I have recently upgraded from CentOS 5.3 to 5.7 (I am required to run these tools on CentOS 5, so I can't upgrade to 6).
I recompiled the whole code but this error still appears.
Has anyone encountered this type of error?
Thanks,
Claudiu
The error means that you built .tools/bridge/bridge on a system with glibc-2.7 (or later), and are trying to run it on a system that has glibc-2.6 or earlier.
Linux (and most UNIXes) does not support "build on later, run on earlier"; only the reverse scenario is supported.
See also this answer.
The 'glibc' is not the latest version, and you can try to update glibc package.
yum install glibc
or
yum install glibc-2.7

GtkMozEmbed module in PyGtk

I'm working on a soloution that needs the gtkMozembed module for python.
I had installed the pygtk2 and genome-python-* packages.
But still i don't have the gtkmozembed module. Can any one tell me how can i install this module.?
I'm also searching for some good repositories for CentOS so that I can update the latest packages. All the repositories now I have, do not maintain the updated packages.
I use CentOs 6.0.
Before continuing, note that gtkmozembed is deprecated, abandoned by the authors and therefore not packaged in CentOS 6 or Ubuntu Oneiric and later:
https://lists.ubuntu.com/archives/ubuntu-devel/2011-May/033229.html
https://groups.google.com/forum/#!topic/mozilla.dev.embedding/c_NMcO-N8wo/discussion
Therefore any use of gtkmozembed is temporary. You may wish to consider the following alternatives which are available as RPM packages on CentOS 6:
pywebkitgtk : Python Bindings for WebKitGTK+
gnome-python2-gtkhtml2 : Python bindings for interacting with gtkhtml2
I managed to download gnome-python2-extras from CentOS 5 and build it on CentOS 6 with the following commands:
rpm -ivh http://vault.centos.org/5.7/os/SRPMS/gnome-python2-extras-2.14.2-7.el5.src.rpm
# edit ~/rpmbuild/SPECS/gnome-python-extras.spec
# comment out the line starting with %patch1
rpmbuild -ba ~/rpmbuild/SPECS/gnome-python-extras.spec