MonetDB install with Java 1.8 Error - Unsupported major.minor version 52.0 - monetdb

I am following the MonetDB install procedure described by Hannes Mühleisen by running commands 1 to 6 described below.
how do I install MonetDB on Centos 6.5?
sudo yum install openssl-devel pcre-devel
tar xvf MonetDB-.tar.
cd MonetDB-*
./configure
make
sudo make install ---> Fails in this Step
The machines Java Home is /usr/lib/java/jdk1.8.0_25. Apparently, the install is trying to find a 1.7 version somewhere else
Here is the error text
make[4]: Entering directory `/usr/local/MonetDB-11.15.19/java/tests'
make all-am
make[5]: Entering directory `/usr/local/MonetDB-11.15.19/java/tests'
"/usr/local/ant/bin/ant" -f "`readlink -f ./build.xml`" -Dbuilddir="`readlink -f /usr/local/MonetDB-11.15.19/java/tests/jar_jdbctests`" -Djardir="`readlink -f /usr/local/MonetDB-11.15.19/java/tests`" -Dbasedir="`readlink -f .`" jar_jdbctests
Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75.x86_64/lib/tools.jar
Buildfile: /usr/local/MonetDB-11.15.19/java/tests/build.xml
prepare:
find_driver:
BUILD FAILED
/usr/local/MonetDB-11.15.19/java/tests/build.xml:87: java.lang.UnsupportedClassVersionError: nl/cwi/monetdb/jdbc/MonetDriver : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1136)
at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1307)
at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1362)
at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1323)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1076)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.apache.tools.ant.taskdefs.Available.checkClass(Available.java:454)
at org.apache.tools.ant.taskdefs.Available.eval(Available.java:285)
at org.apache.tools.ant.taskdefs.condition.And.eval(And.java:42)
at org.apache.tools.ant.taskdefs.ConditionTask.execute(ConditionTask.java:120)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:154)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

I think there are two different Java VMs installed on this machine, and for some reason (suspect per-user setting of $JAVA_HOME and/or $PATH) lead to the make using 1.8 and sudo make install using 1.7. The UnsupportedClassVersionError at least suggests this. I suggest you make sure only one version is used.
For CentOS, this should do it:
sudo /usr/sbin/alternatives --config java
sudo /usr/sbin/alternatives --config javac
Update: Turns out MonetDB now provides CentOS rpms: https://www.monetdb.org/downloads/epel/

Related

How can I install Canon scanner/libpango

I am installing Canon MG3650S printer/scanner on Ubuntu 22.04. It looks like something is wrong with installing libpango. I discovered that it was missing from the dependency list. However, after installing it, something is still missing. I noticed that "libpango-1.0-0 set to manually installed", but could not figure out what does it mean. Below you find the screen log.
~/Downloads/scangearmp2-3.20-1-deb$ sudo apt-get install libpango-1.0-0
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libpango-1.0-0 is already the newest version (1.50.6+ds-2).
libpango-1.0-0 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 150 not upgraded.
~/Downloads/scangearmp2-3.20-1-deb$ sudo ./install.sh
==================================================
ScanGear MP
Version 3.20
Copyright CANON INC. 2007-2015
==================================================
Command executed = sudo dpkg -iG ./packages/scangearmp2_3.20-1_amd64.deb
Selecting previously unselected package scangearmp2.
(Reading database ... 272630 files and directories currently installed.)
Preparing to unpack .../scangearmp2_3.20-1_amd64.deb ...
Unpacking scangearmp2 (3.20-1) ...
dpkg: dependency problems prevent configuration of scangearmp2:
scangearmp2 depends on libpango1.0-0 (>= 1.14.0); however:
Package libpango1.0-0 is not installed.
dpkg: error processing package scangearmp2 (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
scangearmp2
Command executed = sudo dpkg -P scangearmp2
(Reading database ... 272652 files and directories currently installed.)
Removing scangearmp2 (3.20-1) ...
Purging configuration files for scangearmp2 (3.20-1) ...
BTW: On another copy of the same Ubuntu, I did not notice this issue. What could be the cause?
You need the Package libpango1.0-0 - which can be install with Synaptic. That was my problem too. After that everything OK.
dpkg -L libpango1.0-0
dpkg -L libpango-1.0-0

patchelf - stat: No such file or directory

We are trying to solve below issue :
INFO | jvm 2 | 2022/04/05 09:06:23.421 | Caused by:
java.lang.UnsatisfiedLinkError:
/home/usr/examples/tmp/.djl.ai/pytorch/1.9.1-cpu-linux-x86_64/0.14.0-cpu-libdjl_torch.so:
/lib64/libm.so.6: version `GLIBC_2.23' not found (required by
/home/usr/examples/tmp/.djl.ai/pytorch/1.9.1-cpu-linux-x86_64/libtorch_cpu.so)
Ran the "strings" command to show what all GLIBC version and could not find "2.23", followed this instruction - https://serverfault.com/questions/894625/safely-upgrade-glibc-on-centos-7 which is we are trying to have GLIBC 2.23 on Centos 7.9, and we were able to complete "make install" using --prefix to use seperate path.
When running this "patchelf" especially this command i am attempting to run :
patchelf --set-interpreter /opt/glibc-2.23/lib/ld-linux-x86-64.so.2
--set-rpath /opt/glibc-2.23/lib:/usr/lib64 pytorch
I am getting below error where "pytorch" is python module installed :
stat: No such file or directory
Please advise if anything missed or

How to install gerrit-3.3.0 using jdk8?

I use jdk8 and I tried to install latest Gerrit, It seems the Gerrit-3.3.0 is the newest version I can install, however it still fail.
I have tried two ways:
download the gerrit-3.3.0.war and install it using 'java -jar gerrit-3.3.0.war init -d ./my_review_site' , but it returned error
clone the gerrit and build it with bazelisk then install it using 'java -jar release.war init -d ./my_review_site'. and it returned error, too.
Here is the error:
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: Main has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)
Hope for your help! Thanks!

pandoc can't install due to http-client

I'm trying to install pandoc 1.13.1 on Ubuntu 12.04.5, but its failing due to a dependency on http-client:
$ cabal install pandoc --verbose
Reading available packages...
Choosing modular solver.
Resolving dependencies...
Extracting
/home/paleozogt/.cabal/packages/hackage.haskell.org/pandoc/1.13.1/pandoc-1.13.1.tar.gz
to /tmp/pandoc-1.13.1-14926...
creating /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup
creating /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist
creating /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup
/usr/bin/ghc --make /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/Setup.hs -o /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup/setup -odir /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup -hidir /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup -i -i/tmp/pandoc-1.13.1-14926/pandoc-1.13.1 -package Cabal-1.14.0
[1 of 1] Compiling Main ( /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/Setup.hs, /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup/Main.o )
Linking /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup/setup ...
/tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup/setup configure --verbose=2
--ghc --prefix=/home/paleozogt/.cabal --user --flags=-trypandoc
--flags=network-uri --flags=-make-pandoc-man-pages --flags=https
--flags=-embed_data_files --constraint=zlib ==0.5.4.1 --constraint=zip-archive
==0.2.3.4 --constraint=yaml ==0.8.9.3 --constraint=xml ==1.3.13
--constraint=vector ==0.10.12.1 --constraint=unordered-containers ==0.2.5.1
--constraint=time ==1.4 --constraint=text ==1.1.1.3 --constraint=texmath ==0.8
--constraint=temporary ==1.2.0.3 --constraint=tagsoup ==0.13.3
--constraint=syb ==0.4.2 --constraint=scientific ==0.3.3.1 --constraint=random
==1.0.1.1 --constraint=process ==1.1.0.1 --constraint=parsec ==3.1.7
--constraint=pandoc-types ==1.12.4.1 --constraint=old-time ==1.1.0.0
--constraint=old-locale ==1.0.0.4 --constraint=network-uri ==2.6.0.1
--constraint=network ==2.6.0.2 --constraint=mtl ==2.2.1
--constraint=http-types ==0.8.5 --constraint=http-client-tls ==0.2.2
--constraint=http-client ==0.4.2 --constraint=hslua ==0.3.13
--constraint=highlighting-kate ==0.5.9 --constraint=haddock-library ==1.1.1
--constraint=filepath ==1.3.0.0 --constraint=extensible-exceptions ==0.1.1.4
--constraint=directory ==1.1.0.2 --constraint=deepseq-generics ==0.1.1.1
--constraint=data-default ==0.5.3 --constraint=containers ==0.4.2.1
--constraint=bytestring ==0.9.2.1 --constraint=blaze-markup ==0.6.1.1
--constraint=blaze-html ==0.7.0.3 --constraint=binary ==0.7.2.2
--constraint=base64-bytestring ==1.0.0.1 --constraint=base ==4.5.0.0
--constraint=array ==0.4.0.0 --constraint=aeson ==0.7.0.6 --constraint=SHA
==1.6.4.1 --constraint=JuicyPixels ==3.1.7.1 --constraint=HTTP ==4000.2.18
--disable-tests --disable-benchmarks
Configuring pandoc-1.13.1...
setup: At least the following dependencies are missing:
http-client >=0.3.2 && <0.4 && ==0.4.2
World file is already up to date.
cabal: Error: some packages failed to install:
pandoc-1.13.1 failed during the configure step. The exception was:
ExitFailure 1
What's weird is that http-client is installed:
$ cabal install http-client
Resolving dependencies...
All the requested packages are already installed:
http-client-0.4.2
Use --reinstall if you want to reinstall anyway.
What's going on here?
It seems cabal installed a too recent version of the http-client. I had the same problem and got over it by doing
cabal install --reinstall --force-reinstalls 'http-client < 0.4'
ghc-pkg unregister http-client-tls-0.2.2
ghc-pkg unregister http-client-0.4.2.2
cabal install pandoc
cabal install pandoc 'http-client < 0.4'

installing java ee 7 on a brand new mac book air

I managed to install JDK 7 thanks to it being a dmg file, but I'm having problems installing Java EE 7... I have registered JAVA_HOME on launchd.conf but its still not finding it... here's the error:
sudo sh ./java_ee_sdk-7-unix.sh
Extracting the installer archive...
java.io.EOFException: Unexpected end of ZLIB input stream
at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:240)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:193)
at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:139)
at sun.tools.jar.Main.extractFile(Main.java:961)
at sun.tools.jar.Main.extract(Main.java:877)
at sun.tools.jar.Main.run(Main.java:263)
at sun.tools.jar.Main.main(Main.java:1177)
Extracting the installer runtime...
Unable to find a $JAVA_HOME at "/usr", continuing with system-provided Java...
Extracting the installer resources...
Unable to find a $JAVA_HOME at "/usr", continuing with system-provided Java...
Extracting the installer metadata...
Unable to find a $JAVA_HOME at "/usr", continuing with system-provided Java...
java.io.EOFException: Unexpected end of ZLIB input stream
at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:240)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:193)
at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:139)
at sun.tools.jar.Main.extractFile(Main.java:961)
at sun.tools.jar.Main.extract(Main.java:877)
at sun.tools.jar.Main.run(Main.java:263)
at sun.tools.jar.Main.main(Main.java:1177)
chmod: product-installer.sh: No such file or directory
sh: product-installer.sh: No such file or directory
and here's what happens when i echo JAVA_HOME:
echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home
java -version
java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)
Any help? I'm kinda new to mac

Resources