Skip to content

Instantly share code, notes, and snippets.

@7468696e6b
Last active November 2, 2024 06:41
Show Gist options
  • Save 7468696e6b/ec8fa5d6cdb4e80633b9df95869b70c0 to your computer and use it in GitHub Desktop.
Save 7468696e6b/ec8fa5d6cdb4e80633b9df95869b70c0 to your computer and use it in GitHub Desktop.
how to install Okular viewer on macOS Big Sur, using M1/Apple Silicon/arm64
  1. Install homebrew from https://brew.sh/ (follow the instructions there)
  2. tap the https://invent.kde.org/packaging/homebrew-kde/ repo, brew tap kde-mac/kde https://invent.kde.org/packaging/homebrew-kde.git
  3. brew edit okular, workaround now is to comment out or delete the line depends_on "chmlib" (won't compile on macos arm64 for now as of 2021-08-18), then save (if using vim you need to first press i to insert/type, when saving then <esc> then :wq then <enter>.
  4. brew install okular, wait for stuff to compile and/or install
  5. It may ask for keychain credentials (to sign the binaries? because of mac arm64 security policy https://eclecticlight.co/2021/01/26/when-you-dont-have-permission-to-run-an-app-on-an-m1-mac/)
  6. $(brew --repo kde-mac/kde)/tools/do-caveats.sh
  7. Now okular is in your $HOME/Applications/KDE folder, and will show up in Launchpad! You can view pdf, djvu, etc documents.
@tarungka
Copy link

Thank you, I did try searching for the precompiled binary, wasn't easy to find, the link works :)

This method works for me, but here was an error "okular" can’t be opened because Apple cannot check it for malicious software. Which I had to override.

@aspauldingcode
Copy link

I’m probably going to make a nix derivation for it sometime.
so I can install on mac too.

@ferdiga
Copy link

ferdiga commented Sep 11, 2024

I’m probably going to make a nix derivation for it sometime. so I can install on mac too.

installs on macbook and works so far

@makotosakuraijp
Copy link

But I cannot print PDF files...

@makotosakuraijp
Copy link

I downgraded followings.

$ brew doctor

Uncommitted files:
M Formula/k/karchive.rb
M Formula/k/kdoctools.rb
M Formula/k/ki18n.rb
M Formula/q/qca.rb
M Formula/t/threadweaver.rb

karchive 5.111.0
kdoctools 5.111.0
ki18n 5.115.0
qca 2.3.7
threadweaver 5.115.0

kf5-kactivities.rb 5.111.0
kf5-kbookmarks.rb 5.102.0
kf5-kconfigwidgets.rb 5.102.0
kf5-khtml.rb 5.102.0
kf5-kio.rb 5.102.0
kf5-knotifications.rb 5.111.0
kf5-kparts.rb 5.102.0
kf5-kwallet.rb 5.102.0
kf5-kxmlgui.rb 5.102.0

Then, I could install okular 23.08.2. But the print preview is too small and I cannot print PDF files...

Is there someone help me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment