dyld: Library not loaded: /usr/local/libodep/lib/libintl.8.dylib - python

I want to use unoconv with LibreOffice 4.2, but it seems like I can not start the python of LibreOffice.
When I run
/Applications/LibreOffice.app/Contents/MacOS/LibreOfficePython.framework/Versions/3.3/Resources/Python.app/Contents/MacOS/LibreOfficePython -v
The error is:
dyld: Library not loaded: /usr/local/libodep/lib/libintl.8.dylib
Referenced from: /Applications/LibreOffice.app/Contents/MacOS/LibreOfficePython.framework/Versions/3.3/Resources/Python.app/Contents/MacOS/LibreOfficePython
Reason: image not found
Trace/BPT trap: 5

Not directly an answer to the original question, but I ended up on this page after searching for the same error message, while running gpg. Turns out gettext was mangled during upgrade of ios. The following sorted it:
brew install gettext
brew link gettext --force

I just ran into the same issue. The fix is ugly, but essentially follows Michael's approach. The lib is provided by MacPorts and installed there:
> find /opt/ -name 'libintl*'
/opt/local/include/libintl.h
/opt/local/lib/libintl.8.dylib
...
A simple softlink into /usr/ does the trick, but gee do I dislike polluting trees like this!
> sudo bash
> mkdir -p /usr/local/libodep/lib
> ln -s /opt/local/lib/libintl.8.dylib /usr/local/libodep/lib/libintl.8.dylib
With this, the Python 3.3 from LibreOffice runs. I sure hope that somebody at LibreOffice is going to fix this. Anybody know if a bug has been filed?

The library it's attempting to load isn't a standard dylib on MacOS. Whoever created LibreOffice should have either included the dylib in their app package somewhere or they should have included instructions on how to set things up properly for LibreOffice.
From what I can tell, it looks like you need to install MacPorts in order to pick up libintl.8.dylib.
And MacPorts is likely to install that library into "/opt/local/lib/" instead of "/usr/local/libodep/". Not sure if LibreOffice is smart enough to know what to do in that case but you can do a symbolic link from a file in one directory to a sym link in another directory in a pinch if you're desperate.

I came across the same issue as:
dyld: Library not loaded: /usr/local/lib/libintl.8.dylib
Referenced from:
/opt/local/bin/yasm
Reason: image not found
Trace/BPT trap: 5
I had to install MacPorts and gettext, which installs the libintl.* libraries in /opt/local/lib
MacPorts defines the dependency of yasm on gettext

You'll find the same topic here for followup:
https://github.com/dagwieers/unoconv/issues/125
Though the provided answers didn't work for me, installing macports didn't work for me,
libintl.8.dylib I didn't find on /opt/local/lib/
I found others have the problem not being compatible.
gettext also didn't work for me.

Related

error running sphinx due to dyld: Library not loaded: #rpath/Python

I'm trying to use sphinx to build documentation of a package I'm developing. The commands I use used to work. It looks like a link to a library has disappeared on my machine. I'm using a Mac.
> sphinx-autobuild . _build/html
dyld: Library not loaded: #rpath/Python
Referenced from: /Users/XXX/Library/Enthought/Canopy_64bit/User/bin/python
Reason: image not found
where XXX is my user name
Most similar question I can find is pyside-rcc "dyld: Library not loaded:..."
but the answer provided seems to be to copy over a bunch of files from one directory to another, which seems to risk causing other configuration problems.
Other answers relate to issues with
virtualenv (which I am not using) `dyld: Library not loaded` error preventing virtualenv from loading
brew + awscli (again, not being used by me) How to resolve "dyld: Library not loaded: #executable_path.." error
Based on the questions I've seen, it looks like I should fix this by changing the path. Currently
>echo $PATH
Applications/anaconda/bin:/Users/XXX/Library/Enthought/Canopy_64bit/User/bin:/Users/XXX/anaconda/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/TeX/texbin:/opt/X11/bin
My .bash_profile is
# added by Anaconda 2.1.0 installer
export PATH="/Users/XXX/anaconda/bin:$PATH"
# Added by Canopy installer on 2016-08-08
# VIRTUAL_ENV_DISABLE_PROMPT can be set to '' to make the bash prompt show that Canopy is active, otherwise 1
alias activate_canopy="source '/Users/XXX/Library/Enthought/Canopy_64bit/User/bin/activate'"
VIRTUAL_ENV_DISABLE_PROMPT=1 source '/Users/XXX/Library/Enthought/Canopy_64bit/User/bin/activate'
# added by Anaconda3 4.3.1 installer
export PATH="/Applications/anaconda/bin:$PATH"
That activate command that canopy is doing looks to be part of the problem.
I fixed this by removing
alias activate_canopy="source '/Users/XXX/Library/Enthought/Canopy_64bit/User/bin/activate'"
VIRTUAL_ENV_DISABLE_PROMPT=1 source '/Users/XXX/Library/Enthought/Canopy_64bit/User/bin/activate'
from my .bash_profile. Still waiting to see if this breaks Canopy.

error about libpl (shared) when using pyswip (mac)

I got the error libpl (shared) not found.(see below for details) when using pyswip (mac). I know there is a question about it posted several years ago, but it is not solved. I installed swiprolog(>7.0.0) with homebrew and run 2to3 for pyswip. Help me.
PS: I am learning logic programming, I need it.
libpl (shared) not found. Possible reasons: 1) SWI-Prolog not
installed as a shared library. Install SWI-Prolog (5.6.34 works just
fine) An exception has occurred, use %tb to see the full traceback.
The error is thrown here.
# UNIX-like
try:
_lib = CDLL("libpl.dylib")
except IndexError:
# let's try the cwd
_lib = CDLL("./libpl.so")
I finally found a solution: pyswip does not support SWI-Prolog 8.x.x and the only SWI-Prolog version that has worked for me is Homebrew's swi-prolog 7.6.4 (latest 7.x.x stable release). Because Homebrew does not keep track of different versions of swi-prolog, I had to really dig to find the old 7.6.4 "formula". Now it works with the current version of pyswip (0.2.8).
TL; DR: Remove your current SWI-Prolog install (and remove any associated PATH editing), do brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/09a94009142a6265b0b8e322463100610aeda964/Formula/swi-prolog.rb and call it a day.
EDIT:
Caveat: This approach will not let you use some Prolog packages such as library(process) and library(http/json). To correct this, you can install the macOS app and manually install and relink the libncurses.6.dylib in order for PySwip to be able to find it, like this:
brew install ncurses # Specifically install this library
sudo find / -name "libncurses.6.dylib" # You'll see an entry in /usr/local/Cellar/ncurses/6.1/lib/libncurses.6.dylib or something like that in /.../Cellar/ncurses/ (Homebrew folder)
# Now go relink the libswipl.dylib to depend on the newly installed `ncurses` library
cd /Applications/SWI-Prolog.app/Contents/swipl/lib/x86_64-darwin15.6.0 # The "darwin" version may vary depending on your OS/SWI-Prolog version
# You'll see that it is linked against a fake /opt/local/lib/libncurses.6.dylib which doesn't in fact exist
otool -L libncurses.6.dylib
# Now check the top-level lib, libswipl.dylib, it should show a "#executable_path/../swipl/lib/x86_64-darwin15.6.0/libncurses.6.dylib" or something like that depending on your version.
otool -L libswipl.dylib
# Now replace the fake with the real by actually modifying the top-level lib, libswipl.dylib. Contrary to intuition, the way linking works in macOS is that you can only modify the depending library, so libswipl.dylib instead of libncurses.6.dylib.
install_name_tool -change #executable_path/../swipl/lib/x86_64-darwin15.6.0/libncurses.6.dylib /usr/local/Cellar/ncurses/6.1/lib/libncurses.6.dylib libswipl.dylib
# Now you'll see that libswipl.dylib has been successfully modified:
otool -L libswipl.dylib

Mac psql/readline - Library not loaded

I'm working on a Mac, Sierra 10.12.3, and I'm trying to access a PostgreSQL database via the psql command, but it threw the error
dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib
Referenced from: /usr/local/bin/psql
Reason: image not found
Abort trap: 6
A day or two ago, I was working with someone and I needed to install pip, so I ran brew install pip, and it was all good. This is the first time I'm trying to run psql since then and I'm not certain that this has anything to do with my problem, but it seems likely since I haven't made any other changes.
Now I did a little detective work and found that if I went to /usr/local/opt/ there was indeed a readline alias directory that pointed to /usr/local/Cellar/readline/7.0.1 (version 7.0.1 also seeming to have gotten installed at some point - maybe as part of pip? Maybe I did it by mistake...) so it made some sense that the original error should be thrown. I changed the alias to point to /usr/local/Cellar/readline/6.3.8 and the error changed slightly:
dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib
Referenced from: /usr/local/bin/psql
Reason: no suitable image found. Did find:
/usr/local/opt/readline/lib/libreadline.6.dylib: stat() failed with errno=20
Abort trap: 6
So it seems like I'm getting somewhere, but still having an issue. If anyone can shed some light on a solution, I would be forever grateful.
I was able to resolve this by simply running brew switch readline 6.3.8
Readline has been upgraded but you are still using an older psql from postgres. Upgrading postgres to a current version that uses the current readline fixed the problem for me:
brew upgrade postgres
After I run brew upgrade, I also had this problem.
First, You need to confirm the version of the readline on your Mac.
In your situation, your old readline's version is 6.x. After upgrading, your readline was updated into 7.0.1. So you need to link your new readline.
These code might be helpful.
$ cd /usr/local/opt/readline/lib/ # cd to readline library
$ sudo ln -s libreadline.7.dylib libreadline.6.dylib # change the link
I think the better way is to change the system readline link, but I don't know how to change.

Python support missing

I installed vim from source according to this link and it was succesful. But there is no python- support. I have installed python-dev and I've looked for the directory the Python config-file is in to set the right flag:
--with-python-config-dir=/usr/lib/python2.7-config
--enable-pythoninterp
I've installed vim from source two times, because the first time I forgot sth.
How can I get python-support now?
The installation guide you showed also states
You may need to add --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu/ to the configure call.
Have you tried this?
FYI, this is the contents of the directory on my Debian jessie (aka testing) x86_64.
$ ls /usr/lib/python2.7/config-x86_64-linux-gnu
Makefile Setup Setup.config Setup.local config.c config.c.in
install-sh* libpython2.7-pic.a libpython2.7.a libpython2.7.so# makesetup* python.o

Unable to install python-setuptools: ./configure: No such file or directory

The question is related to the answer to "Unable to install Python without sudo access".
I need to install python-setuptools to install python modules.
I have extracted the installation package.
I get the following error when configuring
[~/wepapps/pythonModules/setuptools-0.6c9]# ./configure --prefix=/home/masi/.local
-bash: ./configure: No such file or directory
I did not find the solution at the program's homepage.
How can I resolve this error?
As Noah states, setuptools isn't an automake package so doesn't use ‘./configure’. Instead it's a pure-Python-style ‘setup.py’ (distutils) script.
You shouldn't normally need to play with .pydistutils.cfg, as long as you run it with the right version of Python. So if you haven't added the .local/bin folder to PATH, you'd have to say explicitly:
/home/masi/.local/bin/python setup.py install
AIUI this should Just Work.
I did not find the solution at the program's homepage.
Yeah, they want you to install it from a shell script egg which uses the default version of Python. Which you don't want.
(Another approach if you can't get setuptools to work is to skip it and install each module and dependency manually. Personally I have a bit of an aversion to setuptools/egg, as it contains far too much “clever” magic for my tastes and makes a mess of my filesystem. But I'm an old curmudgeon like that. Most Python modules can be obtained as simple Python files or plain old distutils scripts, but unfortunately there are some that demand eggs.)
You might want to check http://peak.telecommunity.com/DevCenter/EasyInstall#custom-installation-locations.
EasyInstall is a python module with some shell scripts (or some shell scripts with a python module?) and does not use the unix make tool that gets configured with the "./configure" command. It looks like your best bet is to try editing ~/.pydistutils.cfg to include:
[install]
install_lib = /home/masi/.local/lib/python/site-packages/
install_scripts = /home/masi/.local/bin
You'll also presumably have made the ~/.local/bin/ folder part of your PATH so you can run the easy_install script. (I'm not sure exactly where the site-packages directory will be under .local, but it shouldn't be hard to find.)
Hope this helps.

Categories

Resources