- Install homebrew from https://brew.sh/ (follow the instructions there)
- tap the https://invent.kde.org/packaging/homebrew-kde/ repo,
brew tap kde-mac/kde https://invent.kde.org/packaging/homebrew-kde.git
brew edit okular
, workaround now is to comment out or delete the linedepends_on "chmlib"
(won't compile on macos arm64 for now as of 2021-08-18), then save (if using vim you need to first pressi
to insert/type, when saving then<esc>
then:wq
then<enter>
.brew install okular
, wait for stuff to compile and/or install- 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/)
$(brew --repo kde-mac/kde)/tools/do-caveats.sh
- Now okular is in your
$HOME/Applications/KDE
folder, and will show up in Launchpad! You can view pdf, djvu, etc documents.
Edit: as of 2025 there is now a precompiled nightly binary available for download at https://okular.kde.org/download/, or at https://cdn.kde.org/ci-builds/graphics/okular/master/macos-arm64/. It is unsigned so use sudo xattr -rd com.apple.quarantine /Applications/okular.app
to bypass quarantine after install.
For qt5 cmake error, where did you install qt5? It's better if you check the error log. For me, it's something like
/opt/homebrew/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake
containsget_filename_component(_qt5Gui_install_prefix ${CMAKE_CURRENT_LIST_DIR}/../../../ ABSOLUTE)
but it's invalid.For the brew tap, you need to
Then it should be fine