Tesseract on OSX: dyld: Library not loaded: /usr/local/lib/libtiff.5.dylib - tesseract

I just installed tesseract locally on my mac and installed Leptonia . Xaamp use as utility server .
I have the following problem , when you launch the command tesseract from terminal all is successful, however, if the launch tesseract command from php script gives me this error :
dyld: Library not loaded: /usr/local/lib/libtiff.5.dylib
Referenced from: /usr/local/opt/leptonica/lib/liblept.4.dylib
Reason: Incompatible library version: liblept.4.dylib requires version 8.0.0 or later, but libtiff.5.dylib provides version 6.0.0
can someone help me? thank you

I have a problem similar, but not the same. You can try this:
brew install tesseract
If you Could not symlink, /usr/local/bin is not writable, use this command:
sudo chown -R $(whoami) /usr/local
After that install the autoconf, automake, and libtool with this command:
brew install autoconf automake libtool
I think you will need use this one as well: brew install leptonica --with-libtiff
Finally use the link command to link all libs: brew link tesseract, brew link automake, brew link libtool, etc...
I hope it helps you.

I did this and it helped me with a similar problem.
https://sourceforge.net/p/vietocr/discussion/833570/thread/e1eec2b14b/#e296
I went to /usr/local/opt/tesseract/lib/. I had libtesseract.5.dylib and created a symlink with following command: sudo ln -s libtesseract.5.dylib libtesseract.4.dylib

Related

OpenSSL#1.1 not getting linked with Homebrew - trying to install postgresql

My system is OS Mojave 10.14.6, when I try to install postgresql I have this error:
Error: An exception occurred within a child process:
RuntimeError: /usr/local/opt/openssl#1.1 not present or broken
Please reinstall openssl#1.1. Sorry :(
When I try to install openssl#1.1 I have this message:
brew install openssl#1.1
Running `brew update --preinstall`...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
==> Updated Casks
Updated 8 casks.
Warning: openssl#1.1 1.1.1n is already installed, it's just not linked.
To link this version, run:
brew link openssl#1.1
➜ / brew link openssl#1.1
Warning: Refusing to link macOS provided/shadowed software: openssl#1.1
If you need to have openssl#1.1 first in your PATH, run:
echo 'export PATH="/usr/local/opt/openssl#1.1/bin:$PATH"' >> ~/.zshrc
For compilers to find openssl#1.1 you may need to set:
export LDFLAGS="-L/usr/local/opt/openssl#1.1/lib"
export CPPFLAGS="-I/usr/local/opt/openssl#1.1/include"
For pkg-config to find openssl#1.1 you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/openssl#1.1/lib/pkgconfig"
And then when I try to force hombrew link openssl, I get this message
Warning: Refusing to link macOS provided/shadowed software: openssl#1.1
If you need to have openssl#1.1 first in your PATH, run:
echo 'export PATH="/usr/local/opt/openssl#1.1/bin:$PATH"' >> ~/.zshrc
For compilers to find openssl#1.1 you may need to set:
export LDFLAGS="-L/usr/local/opt/openssl#1.1/lib"
export CPPFLAGS="-I/usr/local/opt/openssl#1.1/include"
For pkg-config to find openssl#1.1 you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/openssl#1.1/lib/pkgconfig"
I added the lines to .zshrc file like suggested:
export PATH="/usr/local/opt/openssl#1.1/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/openssl#1.1/lib"
export CPPFLAGS="-I/usr/local/opt/openssl#1.1/include"
export PKG_CONFIG_PATH="/usr/local/opt/openssl#1.1/lib/pkgconfig"
But I kept on having the message when retrying to intall postgresql
Error: An exception occurred within a child process:
RuntimeError: /usr/local/opt/openssl#1.1 not present or broken
I have read and try everything I found on the net regarding this question. I don't find any solution, any help would be very useful thanks!
UPDATE:
I got homebrew from this command :
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
and The pg version in my rails gemfile is
gem "pg", "1.3.5"
but I just tried brew install pg,
and bundle install fails also
UPDATE 2
when trying to
brew reinstall openssl
openssl#3 is installed and I get this message:
openssl#3 is keg-only, which means it was not symlinked into /usr/local,
because macOS provides LibreSSL.
and then when I try to
brew install postgresql
I have the same error:
Error: An exception occurred within a child process:
RuntimeError: /usr/local/opt/openssl#1.1 not present or broken
Please reinstall openssl#1.1.
I am having this same issue and did much of what cecileRx did as well to no avail. I am getting this issue as part of the 'brew install px4-sim-jmavsim' step in this PX4-Autopilot setup.
https://docs.px4.io/master/en/dev_setup/dev_env_mac.html
UPDATE: I think I got around this by uninstalling openssl and then installing openssl#1.1
brew uninstall openssl
brew install openssl#1.1
Running those two commands resolved the errors I was getting that matched those described in the questions.

Mongodump/OpenSSL - "image not found" error

I recently updated macOS to Catalina and mongodump is no longer working. I've updated
dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
Referenced from: /usr/local/opt/mongodb#3.6/bin/mongodump
Reason: image not found
I see a few questions out there such as this one: dyld: Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib. This is the accepted response:
brew update && brew upgrade
brew uninstall openssl
brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb
However, I get this error when trying to install version 1.0.0:
Error: Calling Non-checksummed download of openssl formula file from an arbitrary URL is disabled! Use 'brew extract' or 'brew create' and 'brew tap-new' to create a formula file in a tap on GitHub instead.
Is there any way around this? I'm not really sure where to go from that message.
You can check which version of Homebrew is installed by running brew --version
You can use my previous response to implement how Homebrew now suggests it. Or if you want to use previous version of Homebrew to use these commands then follow this:
Go to Homebrew folder cd /usr/local/Homebrew/
Checkout to the previous version by running git checkout 2.3.0
To install OpenSSL HOMEBREW_NO_AUTO_UPDATE=1 brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb
Source: https://github.com/kelaberetiv/TagUI/issues/635#issuecomment-699482920

error while loading shared libraries: libfontconfig.so.1 on cent os

I am newbie for Cent os. Installing phantomjs on Cent os. Followed below steps but still facing issue.
Steps :
curl -O https://phantomjs.googlecode.com/files/phantomjs-1.9.1-linux-i686.tar.bz2.
tar xvf phantomjs-1.9.1-linux-i686.tar.bz2
cp phantomjs-1.9.1-linux-i686/bin/phantomjs /usr/local/bin
sudo yum install freetype
sudo yum install fontconfig
Above all steps completed successfully but when I try to hit phantomjs, it shows error "phantomjs: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory."
Thanks in advance.
Just make sure you successfully run
yum install fontconfig freetype freetype-devel fontconfig-devel libstdc++
and then try to install as usual.
To remove this error.
# sudo yum install fontconfig
If you are still facing the error, Run
# sudo yum install fontconfig freetype libfreetype.so.6 libfontconfig.so.1 libstdc++.so.6
Note :
If you are using ubuntu or debian, use apt-get install to install this package.
centos, NodeJS, html-pdf
sudo yum install fontconfig (worked for me)

libicuuc.so.55: cannot open shared object file

While am compile using swift build, am getting following error in my Ubuntu machine
$swift build
/home/xxxxxxxxx/Downloads/swift-DEVELOPMENT-SNAPSHOT-2016-02-25-a-ubuntu15.10/us
r/bin/swift-build: error while loading shared libraries: libicuuc.so.55: cannot
open shared object file: No such file or directory
How can i fix this issue?
Thanks.
You can manually download the good .dep
wget http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu55_55.1-7_amd64.deb
Then you run:
sudo dpkg -i libicu55_55.1-7_amd64.deb
If it miss some dependency:
sudo apt-get -f install
It has worked for me.
Your can find the other architecture on the debian package website :
https://packages.debian.org/sid/libicu55
p.s: I know this is on SID, but this is the only version that I found
*note...packages may have been removed
Your system lacks a critical component for building Swift, libicu-dev.
Install this:
sudo apt-get install libicu-dev
But that was for building Swift from source. You were talking about building with Swift, my apologies.
Unfortunately it seems it won't work either: Swift for Linux only officially runs on Ubuntu 15.10 and 14.04, and you tell me in the comments that you're running 15.04.
I know there's tutorials on the web on how to make it work on Mint and other distros... But the best would be, if possible, that you update your install of course.
I searched on the net and find a list in debian packages that shows the libicuuc.so.55 file.
apt-get install libicu55
Will resolve the issue.
hallow_me's link to download libicu55_55.1-7_amd64.deb doesn't work.
Here are the latest links https://packages.debian.org/stretch/amd64/libicu57/download
Like
wget http://ftp.us.debian.org/debian/pool/main/i/icu/libicu55_55.1-7_amd64.deb
Then follow hallow_me's instruction to install it.
Try the followings lines
echo "deb http://security.ubuntu.com/ubuntu xenial-security main" | sudo tee --append /etc/apt/sources.list
sudo apt-get update
sudo apt-get install libicu55

installing home brew for rails 3.2

I am trying to install homebrew according to the guidelines described in here.
I have curl and rvm, and want to install rails 1.9.3 on my lion 1.7.4 with Xcode 4.3.2 and with developer command line tools installed.
It seems I will need libksba, which requires me to use to command brew install libksba.
So I will need Home Brew.
I follow the instructions and use
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
which outputs the following:
$ /usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/Formula/...
/usr/local/Library/Homebrew/...
Press enter to continue
==> Downloading and Installing Homebrew...
==> Installation successful!
You should run `brew doctor' *before* you install anything.
Now type: brew help
[~]$
[~]$
[~]$ brew doctor
/usr/local/Library/Homebrew/tab.rb:1:in `require': no such file to load -- ostruct `(LoadError)`
from /usr/local/Library/Homebrew/tab.rb:1
from /usr/local/Library/Homebrew/bottles.rb:1:in `require'
from /usr/local/Library/Homebrew/bottles.rb:1
from /usr/local/Library/Homebrew/extend/pathname.rb:2:in `require'
from /usr/local/Library/Homebrew/extend/pathname.rb:2
from /usr/local/Library/Homebrew/global.rb:1:in `require'
from /usr/local/Library/Homebrew/global.rb:1
from /usr/local/bin/brew:10:in `require'
from /usr/local/bin/brew:10
[~]$
So this means basically that brew was not installed right. Do I have to change the path at which it is looking for? I used to have MacPorts in, which I completely erased so there should be no conflicts there. Please help!!! Thanks a lot! It's an awesome community.
UPDATE:
I time machined back a year because I thought I did something critically wrong. Now I still have an issue installing, but it seems a bit more common.
I installed homebrew using
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
Any command of "brew" gives me this error:
[~]$ brew
/usr/local/bin/brew:6:in `require': no such file to load -- pathname (LoadError)
from /usr/local/bin/brew:6
Any suggestions? Thank you all!
I had the same problem as mentioned in my comment above. To resolve it I ended up having to restore my default system ruby. I am on SnowLeopard - OSX 10.6.8, so your resources may vary, but what I did was:
uninstall xcode: sudo /Developer/Library/uninstall-devtools --mode=all
rsync or copy /System/Library/Frameworks/Ruby.framework from another machine running 10.6.8
You also need the ruby executables in /usr/bin to point to the system Ruby: /usr/bin/{erb,gem,irb,rdoc,ri,ruby,testrb}
these are just symlinks to /System/Library/Frameworks/Ruby.framework
erb -> ../../System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/erb
so I re-symlinked them, for example from /usr/bin: sudo ln -s ../../System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/erb ./erb
the brew executable currently uses /usr/bin/ruby so that needs to be there in the least
I hear future versions of brew will point directly at the system ruby on the /System/Library/Frameworks/Ruby.framework path, so symlinking ruby to a custom install is a bad idea
At this point brew commands worked again and ostruct (part of ruby standard lib) was again found. I went ahead and added xcode back in and worked through some minor 'brew doctor' errors.
I have now replaced all my old macports packages with homebrew packages and its such an improvement!