方法1:下载mendeleydesktop-1.19.8-linux-x86_64.tar.bz2
(参见【笔记】Mendeley desktop下载(非reference版))
方法2:从deb编译
(下载地址:https://www.mendeley.com/autoupdates/installers/1.19.8)
sudo dpkg -i mendeleydesktop_1.19.8-stable_amd64.deb
Selecting previously unselected package mendeleydesktop.
(Reading database ... 239336 files and directories currently installed.)
Preparing to unpack mendeleydesktop_1.19.8-stable_amd64.deb ...
Unpacking mendeleydesktop (1.19.8) ...
dpkg: dependency problems prevent configuration of mendeleydesktop:
mendeleydesktop depends on python; however:
Package python is not installed.dpkg: error processing package mendeleydesktop (--install):
dependency problems - leaving unconfigured
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Errors were encountered while processing:
mendeleydesktop
存在报错:mendeleydesktop depends on python; however: Package python is not installed.
原因可能是ubuntu22.04默认pyhotn3(或安装pyhton2)没有‘python’
解决方法:
1.如果要清除错误安装:sudo apt --fix-broken install
2.修改软链接(softlink)将python指向python2:
(参考:python - How to install Mendeley on Ubuntu 22.04? - Ask Ubuntu)
cd /usr/bin/
sudo mv python python_old
sudo ln -s python2 python
注意!编译成功后需要改回来:
sudo rm python
sudo mv python_old python
3.修改deb文件
(参考:ubuntu - How do I get apt-get to ignore some dependencies? - Server Fault)
- Unpack deb:
ar x golden-linux.deb
(will create i.e. three files: debian-binary control.tar.gz data.tar.gz)- Unpack control archive:
tar xzf control.tar.gz
(will create: postinst postrm preinst prerm md5sums control)- Fix dependencies in
control
(use a text editor)- Repack control.tar.gz:
tar --ignore-failed-read -cvzf control.tar.gz {post,pre}{inst,rm} md5sums control
- Repack deb:
ar rcs newpackage.deb debian-binary control.tar.gz data.tar.gz
(order important! See [Note] )[Note]: dpkg wouldn't be able to read the metadata of a package quickly if it had to search for where the data section ended!
修改control文件:
Depends: libc6, python, gconf2, desktop-file-utils 删掉python即可
方法3:(未尝试)
flatpak install flathub com.elsevier.MendeleyDesktop
flatpak run com.elsevier.MendeleyDesktop
其他:
用方法1安装的Mendeley无法正常使用快捷方式。解决方法是编辑*.desktop文件
/usr/share/applications/mendeleydesktop.desktop
/home/XXX/.local/share/applications/mendeleydesktop.desktop
如下:
[Desktop Entry]
Name=Mendeley Desktop
GenericName=Research Paper Manager
Comment=Mendeley Desktop is software for managing and sharing research papers
Exec=/home/XXX/.local/share/mendeleydesktop %f
Icon=mendeleydesktop
Terminal=false
Type=Application
Categories=Education;Literature;Qt;
X-SuSE-translate=false
MimeType=x-scheme-handler/mendeley;application/pdf;text/x-bibtex;
X-Mendeley-Version=1
亲测安装成功,但方法1和2安装在ubuntu22.04中均存在问题:app窗口界面关闭后仍存在后台进程,以至于无法再次打开。
报错如下:
Mendeley Desktop is already running but may not be responding. Click the Mendeley icon in the taskbar or dock to activate it.
目前我的解决方法是终端直接杀死进程:pkill -f mendeleydesktop
希望能找到更好的解决方法。