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

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

Related

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

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.

Install perl module Net:SSH2 on redhat/centos 7

As the title says I am trying to install the perl module perl-Net-SSH2. I have tried via yum but get an error that no package is available.
yum install perl-Net-SSH2
I have tried by downloading an rpm file but the only one I can find is for el6 and it complains about the version of perl
yum localinstall perl-Net-SSH2-0.45-4.el6.x86_64.rpm
Requires: perl(:MODULE_COMPAT_5.10.1)
I have tried downloading the source code but get told "Unable to find a working version of library ssh2 in the following directories" even though it is installed. (via yum install libssh2 libssh2-devel)
I have tried via cpan but get the same error "Unable to find a working version of library ssh2 in the following directories"
Any ideas? Google is very sketchy on this and only
OK, I solved this while writing the question. Seeing as information on this is limited I thought it would be worth posting the question anyway. The error message was giving the wrong information in that it was actually gcc that was missing, not libssh2. These are the steps I followed. I've tried to make it as verbatim as possible. I have not verified all these modules are required but this is what I installed before compiling it.
yum install libssh2 libssh2-devel
yum install openssl openssl-devel
yum install perl-Net-SSLeay
yum install gcc
Search for Net::SSH2 in google
Click the link "Net::SSH2 - search.cpan.org"
Download source code (tar.gz file)
Copy it to your redhat 7 machine
tar -xvf Net-SSH2-0.62.tar.gz
cd Net-SSH2-x.xx
perl Makefile.PL
make
make install
Should all be working now, test it with
perl -e 'use Net::SSH2;'

decoder jpeg not available mac osx

I am getting a decoder jpeg not available. I libjpeg installed using brew but when I install pillow, is get *** JPEG support not available
I had this working and all of a sudden it stopped working. I have unlinked and linked libjpeg again like it was suggested in few other SO answers. I have also uninstalled pillow and libjpeg and then installed it again, no joy.
Have you installed libjpeg-dev?
sudo apt-get install libjpeg-dev
Edit: realized you're probably on OSX. Have you tried the following step from the accepted answer from this question?
Before installing PIL but after installing libjpeg, change the “JPEG_ROOT = None” line in my setup.py file to “JPEG_ROOT = libinclude(“/usr/local”)” (or wherever libjpeg is installed)
Have you tried the most common solution to this problem?
$ pip uninstall pillow`
$ brew install libjpeg`
$ pip install pillow`
I installed libjpeg form http://ethan.tira-thompson.com/Mac_OS_X_Ports.html and it works now. Probably brew didn't create symlinks where its being expected.

Installing GFortran on Mavericks

I have succeeded with installing numpy and now I am trying to install scipy on Mavericks. The requirement is GFortran but when I am trying to install it, I get a message:
"Unapproved caller.
SecurityAgent may only be invoked by Apple software."
Does anyone know how I can fix this issue?
Restarting the computer has fixed the issue.
I was able to get around this by using the installer command instead of the gui
## SETUP
# get pacakge
wget http://coudert.name/software/gfortran-4.9.0-Mavericks.dmg
# mount
hdiutil attach gfortran-4.9.0-Mavericks.dmg
# issue with clicking desktop icon then pkg icon
# "Unapproved caller. SecurityAgent may only be invoked by Apple software"
## INSTALL
sudo installer -pkg /Volumes/gfortran-4.9.0-Mavericks/gfortran.pkg -target /
## test install
which gfortran
/usr/local/bin/gfortran
Another solution might be to use the brew/fink/macports package. I'm using this package instead of e.g. brew install gcc because (when R is compiling fortran code), I'm getting:
FATAL:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../libexec/as/x86_64/as: I don't understand 'm' flag!

libv41-dev package can't be located for installation

I am trying to stream jpgs using Motion JPEG streamer. I need to install package libv41-dev as a required library and when I install sudo apt-get install libv41-dev, I get Unable to locate package libv41-dev error. Why can't locate that package? I searched in google for that libv41-dev, not much information has come out. That library is required for linux/videodev.h file. Thanks
The library is libv4l-dev. You can install using the command
sudo apt-get install libv4l-dev
Make sure it’s not libv41 it’s libv4l ( letter l )