Error When installing Tesseract 3.05 in Centos7 "error: Leptonica 1.74 or higher is required. Try to install libleptonica-dev package" - tesseract

We had initially installed tesseract 3.04 in centos 7, and know switching to tesseract 3.05. We have un-installed the older versions and have already installed leptonica-1.75.3 downloaded from leptonica home site.
But, when we go for installing tesseract 3.05, we get following error
checking for LEPTONICA... no
configure: error: Leptonica 1.74 or higher is required. Try to install libleptonica-dev package.
when running ./configure in console in tesseract-3.05.01 folder.
Need to know, where the issue is.

The configure script uses pkg-config to see if the leptonica libs are installed (and have the required version).
After you have compiled and installed leptonica from source code you have to manually tell pkg-config where to find the lept.pc config file which is installed with leptonica. Set the PKG_CONFIG_PATH environment variable so it points to the location of lept.pc. If you installed leptonica to its default location you should do:
$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
before running configure for tesseract.

Mine would not work until I did the following copy commands. My Leptonica was installed in the leptonica-1.83.0 directory, yours may be different.
cp /usr/local/leptonica-1.83.0/lib/pkgconfig/lept.pc /usr/lib64/pkgconfig/
cp -a /usr/local/leptonica-1.83.0/lib/liblept /usr/lib64
Also set:
export PKG_CONFIG_PATH=/usr/local/leptonica-1.83.0/lib/pkgconfig
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/leptonica-1.83.0/lib
export LIBLEPT_HEADERSDIR=/usr/local/leptonica-1.83.0/include/leptonica
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/leptonica-1.83.0/lib/pkgconfig
export PKG_CONFIG_PATH=/usr/local/leptonica-1.83.0/lib/pkgconfig/
Then it worked.

Related

How to install Oracle SQL Developer on Linux (Pop!_OS)

I am trying to install SQL Developer on my laptop. I've download the file from Oracle and follow the instruction, I have RPM installed, but when I run rpm -Uhv sqldeveloper-21.4.3-063.0100.noarch.rpm, I encountered the following:
rpm: RPM should not be used directly install RPM packages, use Alien instead!
rpm: However assuming you know what you are doing...
warning: RPM v3 packages are deprecated: sqldeveloper-21.4.3-063.0100.noarch
error: Failed dependencies:
/bin/sh is needed by sqldeveloper-21.4.3-063.0100.noarch
What can I try next?
It looks like you are trying to run a package made for redhat based systems, but PopOS is debian based.
To proceed with the installation you must first install rpm2cpio, then you can extract it by running the command "# rpm2cpio datamodeler-21.4.2.059.0838-1.noarch.rpm", then you can access the extracted directory.
Then you can use the command "# ./sqldeveloper.sh" to run the application.
But, ensure you have a JDK installed You will be prompted to enter a jdk path. (ie usr/java/jdk1.8.0_181) SQL Developer will automatically launch once jdk location is provided

Open Babel can't convert from mol2 to png because Cairo library is not loaded

I first installed Open Babel through brew. When I tried to run the command: "obabel -:"CC(=O)Cl" -opng -O mymol.png", I got this error message: " Open Babel Error in PNG Format
PNG2Format not found. Probably the Cairo library is not loaded." I then proceeded to use brew to uninstall Open Babel. Then, I installed Cairo with brew and then installed Open Babel with brew again. Still though, I try to create a PNG output and it gives me the same error message. I just do not know what's going on??
I’ve found that when using brew to install open-babel, I do not need to install Cairo in a separate step. The open-babel formula includes a '--with-cairo’ option that installs all the required dependencies, including Cairo.
Here is how I installed open-babel with Cairo support:
$ brew install --with-cairo open-babel

Can't install jdk on Fedora with yum nor with rpm

Help! I can't figure out how to install a jdk!
[/usr/lib/jvm]$ su -c "yum install java-1.7.0-openjdk-devel"
Loaded plugins: langpacks, presto, refresh-packagekit
No package java-1.7.0-openjdk-devel available.
Error: Nothing to do
[/usr/lib/jvm]$ su -c "yum install java-1.7.0-openjdk"
Loaded plugins: langpacks, presto, refresh-packagekit
No package java-1.7.0-openjdk available.
Error: Nothing to do
[/usr/lib/jvm]$ su -c "yum install java-1.6.0-openjdk-devel"
Loaded plugins: langpacks, presto, refresh-packagekit
No package java-1.6.0-openjdk-devel available.
Error: Nothing to do
[/usr/lib/jvm]$ su -c "yum install java-1.6.0-openjdk"
Loaded plugins: langpacks, presto, refresh-packagekit
No package java-1.6.0-openjdk available.
Error: Nothing to do
Here I've manually downloaded some rpm's, the last one from oracle's website:
[~]$ rpm -ivh java-1.7.0-openjdk-devel-1.7.0.19-2.3.9.3.fc20.x86_64.rpm
error: Failed dependencies:
java-1.7.0-openjdk = 1:1.7.0.19-2.3.9.3.fc20 is needed by java-1.7.0-openjdk-devel-1:1.7.0.19-2.3.9.3.fc20.x86_64
[~]$ sudo rpm -ivh java-1.7.0-openjdk-1.7.0.19-2.3.9.3.fc20.x86_64.rpm
Preparing... ################################# [100%]
file /usr/lib/jvm-exports/jre-1.7.0-openjdk.x86_64 from install of java-1.7.0-openjdk-1:1.7.0.19-2.3.9.3.fc20.x86_64 conflicts with file from package java-1.7.0-openjdk-1:1.7.0.9-2.3.7.0.fc18.x86_64
file /usr/lib/jvm/jre-1.7.0-openjdk.x86_64 from install of java-1.7.0-openjdk-1:1.7.0.19-2.3.9.3.fc20.x86_64 conflicts with file from package java-1.7.0-openjdk-1:1.7.0.9-2.3.7.0.fc18.x86_64
[~]$ sudo rpm -ivh jdk-7u21-linux-x64.rpm
Preparing... ################################# [100%]
file /etc/init.d/jexec from install of jdk-2000:1.7.0_21-fcs.x86_64 conflicts with file from package jdk-2000:1.6.0_38-fcs.x86_64
Debug
Here's some debug information:
[/usr/lib/jvm]$ yum search jdk
Loaded plugins: langpacks, presto, refresh-packagekit
=========================================================== N/S Matched: jdk ============================================================
java-1.7.0-openjdk-javadoc.noarch : OpenJDK API Documentation
jdk.x86_64 : Java(TM) Platform Standard Edition Development Kit
ldapjdk.noarch : The Mozilla LDAP Java SDK
Name and summary matches only, use "search all" for everything.
.
[/usr/lib/jvm]$ yum list java*
Loaded plugins: langpacks, presto, refresh-packagekit
Installed Packages
java-1.5.0-gcj.x86_64
.
[/usr/lib/jvm]$ cat /etc/fedora-release
Fedora release 18 (Spherical Cow)
Requirements
I must have "jni.h", "libjava.so", "libhpi.so", "lipverify.so" and "libjvm.so" included.
So far I've found out that these DO NOT have what I need:
Undesired Versions (for sure):
jdk1.7.0_06 <-- I'm surprised about this one, but it doesn't have libjvm nor libhpi
java-1.7.0
java-openjdk
java-1.7.0-openjdk-1.7.0.9.x86_64
java-1.5.0-gcj-4.4
java-1.6.0-openjdk
java-1.7.0-openjdk.x86_64
jre-1.5.0-gcj
jre-1.7.0-openjdk.x86_64
jre-openjdk
jre-1.7.0
jre-7u11-linux-x64.rpm java-1.5.0-gcj-1.5.0.0
jre-1.5.0
jre1.7.0_11
jre-gcj
And these do:
Desired Versions (that I know of, there could be more):
jdk1.6.0_34-x86
jdk1.5.0_22-x86
java-6-openjdk
Can someone help me install jdk1.6 or java-6-openjdk please?
The problem here is that you cannot use the Oracle rpm to install JDK 7 when you already have the Oracle JDK 6 as it tries to install the /etc/init.d/jexec script which is already installed and required for JDK 6.
I would advise sticking to the tarball or self extracting *.bin and using JAVA_HOME if you are going to use the Oracle distribution as it does not have this problem and you will probably not need jexec anyway.
In general I would suggest that you install the Oracle JDK not the OpenJDK. Otherwise you might risk running into some issues. I always found problems of all sorts and sizes with OpenJDK that I don't even bother trying it any more.
Download the JDK RPM from here and follow the usual instructions. Its usually very straightforward and without problems.
Full detailed instructions including how to install it here.
Make sure you choose the right version you need (JDK 1.7 or JDK 1.6, dont mix) because from your question you seem to have a confusion of library versions from 1.5 to 1.7.
And another thing, uninstall whatever you have installed already before installing a fresh one to avoid conflicts.
Check my answer here Transaction check error when installing Sun JDK 7
Basically you may use rpm --force to install one JDK on top of the other. This scenario is completely valid specially when you have to develop for different JAVA versions.
Just faced the same issue. I was not comfortable using --force command; did not want to risk messing-up the existing Java that came installed at system setup.
I ended up doing the following and running the app server with a different version of Java under a different user ID.
downloaded the Java tar.gz version and uncompressed:
tar -zxvf jdk-7u45-linux-x64.gz
Created the directory:
mkdir /usr/java/jdk1.7.0_45
Copied the contents to the new directory manually:
cp -r /.../jdk1.7.0_45/* /usr/java/jdk1.7.0_45
Set the java_home under the user ID home directory in .bashrc and .bash_profile files:
export JAVA_HOME=/usr/java/jdk1.7.0_45
export PATH=$JAVA_HOME/bin:$PATH
export PATH=$PATH:/usr/sfw/lib/gcc:/usr/sfw/bin
sudo rpm -i jdk-11.0.9_linux-x64_bin.rpm
or whatever package you are trying to install

problems installing Pango-1.30.1

I have encountered a problem installing Pango-1.30 on a Ubuntu 12.04 platform. During ./configure step I receive a message saying "Could not enable any of Freetype, X11, Cairo, or Win32 backends. Must have at least one backend to build Pango". However, I have build and installed Freetype and X11 and they are located in /usr/bin. How do I inform ./configure where to get them?
Thanks,
Mark Allyn
Ensure you have all the dependencies installed, you can find them in the README file.
They are:
fontconfig
FreeType
HarfBuzz

Cannot find gtkmm.h

I have been asked to port a Linux C++ application to 64-bit RedHat 6.2. Instructions for buildling the application indicate that GTK+ (gtkmm24-2.8.0 or greater) and GLADE (libglademm24-2.6.1 or greater) are required. I successfully ran: aclocal, automake and ./configure but when I run make, I get:
error: gtkmm.h No such file or directory
I could not find gtkmm.h anywhere in the file system. I used yum to search for gtkmm and it found gtkmm24.x86_64 which I installed but it did not install gtkmm.h. Does anyone know how I can get the header files for gtkmm for 64-bit RedHat 6.2?
Install gtkmm24-devel. After that you'll be able to use
pkg-config --cflags gtkmm-2.4
to get the list of include directories needed for using gtkmm.