zegervdv / homebrew-zathura

Homebrew formulae to build Zathura on Mac OS X
539 stars 41 forks source link

Zathura does not open plugin directory #63

Closed psomdeb25 closed 3 years ago

psomdeb25 commented 3 years ago

https://github.com/zegervdv/homebrew-zathura/issues/31#issue-337890549

Quoting Issue#31:

I followed the installation instructions and I got this error when launching zathura:

error: could not open plugin directory: /usr/local/Cellar/zathura/0.3.9/lib/zathura
error: Unknown file type: 'application/pdf'

It seems the brew --prefix zathura does not return the Cellar path:

% brew --prefix zathura
/usr/local/opt/zathura

I manually created the directory and linked the plugin in the Cellar and zathura now works.

This problem remains unresolved for me.

After installing the program with homebrew I followed the instructions: mkdir -p $(brew --prefix zathura)/lib/zathura ln -s $(brew --prefix zathura-pdf-poppler)/libpdf-poppler.dylib $(brew --prefix zathura)/lib/zathura/libpdf-poppler.dylib

However, when I tried opening Zathura I get this error on my terminal: error: could not open plugin directory: /usr/local/lib/zathura

I assumed that the installation of the library may not have happened, hence I tried the mkdir and the ln commands again. But, it shows me the following text.

ln: /usr/local/opt/zathura/lib/zathura/libpdf-poppler.dylib: File exists

My System Details: ProductName: Mac OS X ProductVersion: 10.15.6 BuildVersion: 19G73

zegervdv commented 3 years ago

Can you try symlinking to /usr/local/lib/zathura?

psomdeb25 commented 3 years ago

ln -s $(brew --prefix zathura-pdf-poppler)/libpdf-poppler.dylib $(brew --prefix zathura)/usr/local/lib/zathura

On entering the following source file and target file in the symlink I am presented with the following error. Sorry, I am being a bit naive.

ln: /usr/local/opt/zathura/usr/local/lib/zathura: No such file or directory

Edit: And the following symlinking continues to give me the same error as previously explained in my question. Command: ln -s $(brew --prefix zathura-pdf-poppler)/libpdf-poppler.dylib /usr/local/lib/zathura Error: could not open plugin directory: /usr/local/lib/zathura

zegervdv commented 3 years ago

And does that directory exist after running the ln command?

If not, you may need to remove it again: rm -rf /usr/local/lib/zathura, create it again: mkdir -p /usr/local/lib/zathura and run the last ln command again.

If the directory did not exist before it will have symlinked the dylib file to /usr/local/lib/zathura, which is of course not a directory.

psomdeb25 commented 3 years ago

Thanks for the solution!! I have no idea why mkdir -p did not create the directory earlier. This time I included the full directory tree instead of using $(brew --prefix zathura-pdf-poppler)/libpdf-poppler.dylib