{"id":144,"date":"2020-04-16T20:47:24","date_gmt":"2020-04-16T12:47:24","guid":{"rendered":"http:\/\/cocozq.com\/?p=144"},"modified":"2020-04-17T10:04:39","modified_gmt":"2020-04-17T02:04:39","slug":"%e6%b7%b1%e5%ba%a6linux%e7%b3%bb%e7%bb%9f%e4%b8%8a%e7%bc%96%e8%af%91albert%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/cocozq.com\/?p=144","title":{"rendered":"\u6df1\u5ea6Linux\u7cfb\u7edf\u4e0a\u7f16\u8bd1Albert\u4f7f\u7528"},"content":{"rendered":"<p>Mac\u4e0a\u6709Alfred\u8fd9\u6837\u7684\u8f85\u52a9\u8f6f\u4ef6\uff0c\u975e\u5e38\u597d\u7528\uff0cLinux\u4e0b\u4e5f\u6709\u4e0d\u5c11\uff0c\u6bd4\u5982Albert\/Mutate\uff0c\u8fd9\u4e24\u4e2a\u90fd\u662fQt\u5f00\u53d1\u7684\uff0c\u8fd8\u6709\u4e00\u4e9b\u662fElectron\u5f00\u53d1\u7684\uff0c\u867d\u7136\u770b\u8d77\u6765\u4e0d\u9519\uff0c\u4f46\u662f\u6211\u672c\u8eab\u4e0d\u592a\u559c\u6b22\u7528Electron\u7684\u8f6f\u4ef6\uff0c\u4f53\u79ef\u5927\u8fd0\u884c\u6548\u7387\u4f4e\uff0c\u6240\u4ee5\u5c31\u4e0d\u8003\u8651\u4e86\uff0cMutate\u5f88\u4e45\u6ca1\u4eba\u7ef4\u62a4\u4e86\uff0c\u6240\u4ee5\u6211\u4e00\u76f4\u7528Albert\uff0c\u4e0b\u8f7d\u4e86\u4e8c\u8fdb\u5236\u7684deb\u5305\u53d1\u73b0\u5b89\u88c5\u62a5\u9519\uff0c\u7f3a\u5c11\u5f88\u591a\u4e2a\u5e93\uff0c\u6211\u4e5f\u4e0d\u60f3\u6dfb\u52a0\u6e90\u6765\u5b89\u88c5\uff0cLinux\u7cfb\u7edf\u4e00\u4e2a\u5f88\u5927\u7684\u95ee\u9898\u5c31\u662f\u4f60\u6dfb\u52a0\u5404\u79cd\u6e90\uff0c\u7136\u540e\u5b89\u88c5\u5404\u79cdlib\uff0c\u7a81\u7136\u6709\u4e00\u5929\u5c31\u62a5\u9519\u4e86\uff0c\u5404\u79cd\u7a0b\u5e8f\u65e0\u6cd5\u8fd0\u884c\uff0c\u751a\u81f3\u7cfb\u7edf\u90fd\u65e0\u6cd5\u5347\u7ea7\uff0c\u867d\u7136\u8fd9\u4e9b\u95ee\u9898\u90fd\u80fd\u89e3\u51b3\uff0c\u4f46\u662f\u8981\u6d6a\u8d39\u4e0d\u5c11\u65f6\u95f4\uff0c\u73b0\u5728\u7528\u4e86\u6df1\u5ea6\u7cfb\u7edf\u4e4b\u540e\uff0cGUI\u8f6f\u4ef6\u57fa\u672c\u4e0a\u53ea\u7528\u7cfb\u7edf\u81ea\u5e26\u5546\u5e97\u4e0b\u7684\uff0c\u6240\u4ee5\u5e72\u8106\u5c31\u81ea\u5df1checkout\u6e90\u7801\u4e0b\u6765\u7f16\u8bd1\u6700\u65b0\u7684\u7248\u672c\u4e86\uff0c\u8fd9\u6837\u65e2\u53ef\u4ee5\u7528\u6700\u65b0\u7684\u529f\u80fd\u6216\u8005\u4fee\u590d\u6700\u65b0\u7684bug\uff0c\u8fd8\u53ef\u4ee5\u81ea\u5df1\u5b8c\u5168\u638c\u63a7\u3002<\/p>\n<p>\u4e8e\u662f\u5f00\u59cb\u52a8\u624b\uff0c\u6839\u636e<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/albertlauncher.github.io\/docs\/installing\/\"><strong>\u5b98\u65b9\u6587\u6863<\/strong><\/a>\uff0c\u5148\u521b\u5efa<code>albert-build<\/code>\u76ee\u5f55\u8fdb\u884c\u7f16\u8bd1, \u76f4\u63a5\u62a5\u9519\u5982\u4e0b<\/p>\n<pre><code class=\"line-numbers\">\u279c  albert-build git:(dev) \u2717 cmake ..\/..\/albert -DCMAKE_INSTALL_PREFIX=\/usr -DCMAKE_BUILD_TYPE=Debug\n-- The C compiler identification is GNU 6.3.0\n-- The CXX compiler identification is GNU 6.3.0\n\nCMake Error at lib\/globalshortcut\/CMakeLists.txt:5 (find_package):\n  By not providing \"FindQt5.cmake\" in CMAKE_MODULE_PATH this project has\n  asked CMake to find a package configuration file provided by \"Qt5\", but\n  CMake did not find one.\n\n  Could not find a package configuration file provided by \"Qt5\" (requested\n  version 5.5.0) with any of the following names:\n\n    Qt5Config.cmake\n    qt5-config.cmake\n\n  Add the installation prefix of \"Qt5\" to CMAKE_PREFIX_PATH or set \"Qt5_DIR\"\n  to a directory containing one of the above files.  If \"Qt5\" provides a\n  separate development package or SDK, be sure it has been installed.\n\n<\/code><\/pre>\n<p>\u63d0\u793a\u6ca1\u6709\u914d\u7f6eQt\u7f16\u8bd1\u73af\u5883\uff0c\u8fd9\u4e2a\u53ea\u9700\u8981cmake\u6dfb\u52a0\u53c2\u6570CMAKE_PREFIX_PATH\u6307\u5411QtSDK\u5c31\u884c\u4e86\uff0c\u6bd4\u5982\u6211\u88c5\u7684Qt5.14.2\uff0c\u6dfb\u52a0\u5982\u4e0b<\/p>\n<pre><code class=\"line-numbers\">cmake ..\/..\/albert -DCMAKE_INSTALL_PREFIX=\/usr -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=\/home\/user\/DevTools\/Qt5.14.2\/5.14.2\/gcc_64\/lib\/cmake\/Qt5\n<\/code><\/pre>\n<p>\u7ee7\u7eed\u7f16\u8bd1\uff0c\u518d\u6b21\u62a5\u9519<\/p>\n<pre><code class=\"line-numbers\">Scanning dependencies of target calculator\n[ 44%] Building CXX object plugins\/calculator\/CMakeFiles\/calculator.dir\/src\/configwidget.cpp.o\n[ 44%] Building CXX object plugins\/calculator\/CMakeFiles\/calculator.dir\/src\/extension.cpp.o\n\/home\/user\/Workspace\/QtPrj\/albert\/plugins\/calculator\/src\/extension.cpp:11:22: fatal error: muParser.h: \u6ca1\u6709\u90a3\u4e2a\u6587\u4ef6\u6216\u76ee\u5f55\n #include \"muParser.h\"\n                      ^\ncompilation terminated.\n<\/code><\/pre>\n<p>\u63d0\u793a\u7f3a\u5c11\u4e00\u4e2a\u5934\u6587\u4ef6\uff0c\u76f4\u63a5\u8fd0\u884c<code>sudo apt install libmuparser-dev<\/code>\u5b89\u88c5\u597dlibmuparser\u7ee7\u7eed\u7f16\u8bd1\uff0c\u7f16\u8bd1\u5b8c\u6210\u540e\u4f7f\u7528<code>sudo make install<\/code>\u5b89\u88c5\uff0c\u7136\u540e\u76f4\u63a5\u8fd0\u884calbert\uff0c\u8fd8\u662f\u62a5\u9519\uff0c\u5982\u4e0b<\/p>\n<pre><code class=\"line-numbers\">albert: error while loading shared libraries: libQt5Charts.so.5: cannot open shared object file: No such file or directory\n<\/code><\/pre>\n<p>\u7528ldd\u76f4\u63a5\u67e5\u770balbert\u7f3a\u5c11\u54ea\u4e9b\u5e93<code>ldd \/usr\/bin\/albert<\/code><\/p>\n<pre><code class=\"line-numbers\">\u279c  ldd \/usr\/bin\/albert\n\/usr\/bin\/albert: \/lib\/x86_64-linux-gnu\/libQt5Core.so.5: version `Qt_5.14' not found (required by \/usr\/bin\/albert)\n\/usr\/bin\/albert: \/lib\/x86_64-linux-gnu\/libQt5Core.so.5: version `Qt_5.14' not found (required by \/usr\/bin\/..\/lib\/x86_64-linux-gnu\/albert\/libalbert.so)\n\/usr\/bin\/albert: \/lib\/x86_64-linux-gnu\/libQt5Core.so.5: version `Qt_5.14' not found (required by \/usr\/bin\/..\/lib\/x86_64-linux-gnu\/albert\/libxdg.so)\n\n<\/code><\/pre>\n<p>\u53ea\u662f\u62a5\u7f3a\u5c11libQt5Core.so.5\uff0c\u76f4\u63a5\u53bb<code>\/etc\/ld.so.conf.d<\/code>\u4e0b\u521b\u5efa\u4e00\u4e2a<code>qt5.conf<\/code>\u7684\u6587\u4ef6\uff0c\u91cc\u9762\u5199\u5165QtSDK\u91cc\u9762\u7684\u8fd0\u884c\u5e93\u8def\u5f84\uff0c\u6bd4\u5982<code>\/home\/user\/DevTools\/Qt5.14.2\/5.14.2\/gcc_64\/lib<\/code>\uff0c\u7136\u540e\u8fd0\u884c<code>sudo ldconfig -v|grep qt5<\/code>\u67e5\u770b\uff0c\u914d\u7f6e\u6b63\u786e\u540e\u8fd0\u884calbert\u5c31\u80fd\u8dd1\u8d77\u6765\u4e86\uff0c\u4f46\u662f\u8fd9\u6837\u53ea\u80fd\u5728\u672c\u673a\u4e0a\u9762\u8dd1\uff0c\u8fd9\u65f6\u5019\u518d<code>ldd \/usr\/bin\/albert<\/code>\u5c31\u80fd\u770b\u5230albert\u6240\u9700\u8981\u7684\u5e93\u6587\u4ef6\uff0c\u4ee5\u6b64\u7c7b\u63a8\u5bf9\u5176\u4ed6\u7684so\u4e5f\u68c0\u67e5\u4e00\u4e0b\u3002<\/p>\n<pre><code class=\"line-numbers\">\u279c ldd \/usr\/bin\/albert|grep Qt\n    libQt5Concurrent.so.5 =&gt; \/home\/user\/DevTools\/Qt5.14.2\/5.14.2\/gcc_64\/lib\/libQt5Concurrent.so.5 (0x00007ff0add90000)\n    libQt5Network.so.5 =&gt; \/home\/user\/DevTools\/Qt5.14.2\/5.14.2\/gcc_64\/lib\/libQt5Network.so.5 (0x00007ff0ad9e0000)\n    libQt5Sql.so.5 =&gt; \/home\/user\/DevTools\/Qt5.14.2\/5.14.2\/gcc_64\/lib\/libQt5Sql.so.5 (0x00007ff0ad790000)\n    libQt5Charts.so.5 =&gt; \/home\/user\/DevTools\/Qt5.14.2\/5.14.2\/gcc_64\/lib\/libQt5Charts.so.5 (0x00007ff0acf48000)\n    libQt5X11Extras.so.5 =&gt; \/home\/user\/DevTools\/Qt5.14.2\/5.14.2\/gcc_64\/lib\/libQt5X11Extras.so.5 (0x00007ff0acd40000)\n    libQt5Widgets.so.5 =&gt; \/home\/user\/DevTools\/Qt5.14.2\/5.14.2\/gcc_64\/lib\/libQt5Widgets.so.5 (0x00007ff0ac1a0000)\n    libQt5Gui.so.5 =&gt; \/home\/user\/DevTools\/Qt5.14.2\/5.14.2\/gcc_64\/lib\/libQt5Gui.so.5 (0x00007ff0ab880000)\n    libQt5Core.so.5 =&gt; \/home\/user\/DevTools\/Qt5.14.2\/5.14.2\/gcc_64\/lib\/libQt5Core.so.5 (0x00007ff0ab0a0000)\n    libicui18n.so.56 =&gt; \/home\/user\/DevTools\/Qt5.14.2\/5.14.2\/gcc_64\/lib\/libicui18n.so.56 (0x00007ff0a9260000)\n    libicuuc.so.56 =&gt; \/home\/user\/DevTools\/Qt5.14.2\/5.14.2\/gcc_64\/lib\/libicuuc.so.56 (0x00007ff0a8ea8000)\n    libicudata.so.56 =&gt; \/home\/user\/DevTools\/Qt5.14.2\/5.14.2\/gcc_64\/lib\/libicudata.so.56 (0x00007ff0a74c0000)\n\n<\/code><\/pre>\n<p>\u628a\u627e\u51fa\u6765\u7684so\u5e93\u590d\u5236\u5230albert\u7684\u63d2\u4ef6\u7edf\u8ba1\u76ee\u5f55\u4e0b\uff0c\u7136\u540e\u5728\u5199\u4e00\u4e2a\u542f\u52a8\u7684\u811a\u672c\u6587\u4ef6\u5c31\u53ef\u4ee5\u4e86\uff0c\u5927\u81f4\u5982\u4e0b\uff0cqtplugins\u7528\u6237\u653e\u7f6e\u7528\u7684\u63d2\u4ef6<\/p>\n<pre><code class=\"line-numbers\">#!\/bin\/sh\n\nexport LD_LIBRARY_PATH=\/usr\/lib\/x86_64-linux-gnu\/albert:$LD_LIBRARY_PATH\nexport QT_QPA_PLATFORM_PLUGIN_PATH=\/usr\/lib\/x86_64-linux-gnu\/albert\/qtplugins\n\nalbert\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Mac\u4e0a\u6709Alfred\u8fd9\u6837\u7684\u8f85\u52a9\u8f6f\u4ef6\uff0c\u975e\u5e38\u597d\u7528\uff0cLinux\u4e0b\u4e5f\u6709\u4e0d\u5c11\uff0c\u6bd4\u5982Albert\/Mutate\uff0c\u8fd9\u4e24\u4e2a\u90fd &hellip; <a href=\"https:\/\/cocozq.com\/?p=144\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;\u6df1\u5ea6Linux\u7cfb\u7edf\u4e0a\u7f16\u8bd1Albert\u4f7f\u7528&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[32],"class_list":["post-144","post","type-post","status-publish","format-standard","hentry","category-22","tag-deepin-linuxalbert","hfeed"],"_links":{"self":[{"href":"https:\/\/cocozq.com\/index.php?rest_route=\/wp\/v2\/posts\/144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cocozq.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cocozq.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cocozq.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cocozq.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=144"}],"version-history":[{"count":3,"href":"https:\/\/cocozq.com\/index.php?rest_route=\/wp\/v2\/posts\/144\/revisions"}],"predecessor-version":[{"id":147,"href":"https:\/\/cocozq.com\/index.php?rest_route=\/wp\/v2\/posts\/144\/revisions\/147"}],"wp:attachment":[{"href":"https:\/\/cocozq.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cocozq.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cocozq.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}