在 openSUSE-Leap-15.5-DVD-x86_64 中使用钉钉 dingtalk_7.0.40.30829_amd64
一、到官网下载钉钉 Linux 客户端
localhost:~ # ls -lh /home/suozhang/download/com.alibabainc.dingtalk_7.0.40.30829_amd64.deb
-rw-r–r-- 1 suozhang users 230M Sep 12 23:47 /home/suozhang/download/com.alibabainc.dingtalk_7.0.40.30829_amd64.deb
文件名为 com.alibabainc.dingtalk_7.0.40.30829_amd64.deb,大小为 230MB
二、安装和试用
suozhang@localhost:~> su -
密码:
localhost:~ # dpkg --info /home/suozhang/download/com.alibabainc.dingtalk_7.0.40.30829_amd64.deb
new Debian package, version 2.0.
size 240667848 bytes: control archive=78680 bytes.
220 bytes, 9 lines control
498496 bytes, 3447 lines md5sums
3820 bytes, 116 lines * postinst #!/bin/sh
1419 bytes, 50 lines * postrm #!/bin/sh
835 bytes, 38 lines * preinst #!/bin/sh
1081 bytes, 42 lines * prerm #!/bin/sh
1777 bytes, 46 lines shlibs
67 bytes, 2 lines triggers
Package: com.alibabainc.dingtalk
Version: 7.0.40.30829
Architecture: amd64
Maintainer: dingtalk alibaba-inc
Installed-Size: 887957
Section: devel
Priority: optional
Homepage: https://gov.dingtalk.com
Description: 钉钉
localhost:~ # dpkg --install /home/suozhang/download/com.alibabainc.dingtalk_7.0.40.30829_amd64.deb
Selecting previously unselected package com.alibabainc.dingtalk.
(Reading database … 0 files and directories currently installed.)
Preparing to unpack …/com.alibabainc.dingtalk_7.0.40.30829_amd64.deb …
Unpacking com.alibabainc.dingtalk (7.0.40.30829) …
Setting up com.alibabainc.dingtalk (7.0.40.30829) …
/home/lost+found
/home/ruhong
/home/suozhang
localhost:~ # dpkg -l
-l 是小写字母 l
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
++±=======================-================-================-====================================================
ii com.alibabainc.dingtalk 7.0.40.30829 amd64 钉钉
localhost:~ # dpkg -L com.alibabainc.dingtalk
-L 是大写字母 L
/.
/opt
/opt/apps
/opt/apps/com.alibabainc.dingtalk
/opt/apps/com.alibabainc.dingtalk/entries
/opt/apps/com.alibabainc.dingtalk/entries/applications
/opt/apps/com.alibabainc.dingtalk/entries/applications/com.alibabainc.dingtalk.desktop
/opt/apps/com.alibabainc.dingtalk/entries/applications/com.alibabainc.dingtalk_std_int.desktop
/opt/apps/com.alibabainc.dingtalk/entries/autostart
/opt/apps/com.alibabainc.dingtalk/entries/autostart/com.alibabainc.dingtalk.desktop
…
应用程序——其它——钉钉
是没有任何反应的,更没有提示报错信息
三、查看错误信息并分析原因和修改
localhost:~ # cat /usr/share/applications/com.alibabainc.dingtalk.desktop
[Desktop Entry]
Categories=Chat;
Comment=
Exec=/opt/apps/com.alibabainc.dingtalk/files/Elevator.sh %u
GenericName=dingtalk
Icon=/opt/apps/com.alibabainc.dingtalk/files/logo.ico
Keywords=dingtalk;
MimeType=x-scheme-handler/dingtalk;
Name=钉钉
Type=Application
X-Deepin-Vendor=user-custom
suozhang@localhost:~> bash /opt/apps/com.alibabainc.dingtalk/files/Elevator.sh
“opensuse-leap”
“opensuse-leap” branch
“opensuse-leap” glibc lower branch
preload_libs=./envlib.so ./libharfbuzz.so.0
Load /opt/apps/com.alibabainc.dingtalk/files/7.0.40-Release.30829//dingtalk_dll.so failed! Err=./libm.so.6: version `GLIBC_2.29’ not found (required by /usr/lib64/libgtk-x11-2.0.so.0)
出错提示说找不到 libm.so.6
localhost:~ # locate libm.so.6
/lib/libm.so.6
/lib64/libm.so.6
/opt/apps/com.alibabainc.dingtalk/files/7.0.40-Release.30829/libm.so.6
localhost:~ # rm /opt/apps/com.alibabainc.dingtalk/files/7.0.40-Release.30829/libm.so.6
localhost:~ # ln -s /lib64/libm.so.6 /opt/apps/com.alibabainc.dingtalk/files/7.0.40-Release.30829/libm.so.6
localhost:~ # ll /opt/apps/com.alibabainc.dingtalk/files/7.0.40-Release.30829/libm.so.6
lrwxrwxrwx 1 root root 16 Sep 17 00:22 /opt/apps/com.alibabainc.dingtalk/files/7.0.40-Release.30829/libm.so.6 → /lib64/libm.so.6
删除钉钉自带的 libm.so.6,建立一个软链接使用 opensuse15.5 的/lib64/libm.so.6
localhost:~ # bash /opt/apps/com.alibabainc.dingtalk/files/Elevator.sh
“opensuse-leap”
“opensuse-leap” branch
“opensuse-leap” glibc lower branch
preload_libs=./envlib.so ./libharfbuzz.so.0
Load /opt/apps/com.alibabainc.dingtalk/files/7.0.40-Release.30829//dingtalk_dll.so failed! Err=/usr/lib64/libpango-1.0.so.0: undefined symbol: hb_ot_metrics_get_position
出错提示说 undefined symbol,我也不是很明白,仔细阅读 Elevator.sh 发现错在 libc_version=ldd --version | grep ldd | cut -d' ' -f5
而非/usr/lib64/libpango-1.0.so.0
localhost:~ # ldd --version | grep ldd | cut -d’ ’ -f5
没有任何输出,不能得出 ldd 的版本号数字
localhost:~ # ldd --version | grep ldd | cut -d’ ’ -f 4
2.31
所以要将
libc_version=ldd --version | grep ldd | cut -d' ' -f5
改成
libc_version=ldd --version | grep ldd | cut -d' ' -f 4
localhost:~ # head -n 15 /opt/apps/com.alibabainc.dingtalk/files/Elevator.sh
#!/bin/sh
export QT_QPA_PLATFORM=xcb
export QT_PLUGIN_PATH=/opt/apps/com.alibabainc.dingtalk/files/7.0.40-Release.30829
cd /opt/apps/com.alibabainc.dingtalk/files/7.0.40-Release.30829
preload_libs=“”
check os_info
os_name=cat /etc/os-release | grep ^ID= | cut -d'=' -f 2
echo ${os_name}
libc_version=ldd --version | grep ldd | cut -d' ' -f5
libc_version_num=echo "${libc_version}" | tr '.' ' '
libc_version_m=0
libc_version_b=0
libc_lower=false
localhost:~ # sed -n ‘s/f5/f 4/p’ /opt/apps/com.alibabainc.dingtalk/files/Elevator.sh
libc_version=ldd --version | grep ldd | cut -d' ' -f 4
localhost:~ # sed -i ‘s/f5/f 4/’ /opt/apps/com.alibabainc.dingtalk/files/Elevator.sh
简单的方法是自己使用 VIM 或者 gedit 文本编辑软件打开 Elevator.sh 修改 f5 成 f 4 再保存就行了(f 与 4 之间有一个空格),这里使用 sed 操作
localhost:~ # head -n 15 /opt/apps/com.alibabainc.dingtalk/files/Elevator.sh
#!/bin/sh
export QT_QPA_PLATFORM=xcb
export QT_PLUGIN_PATH=/opt/apps/com.alibabainc.dingtalk/files/7.0.40-Release.30829
cd /opt/apps/com.alibabainc.dingtalk/files/7.0.40-Release.30829
preload_libs=“”
check os_info
os_name=cat /etc/os-release | grep ^ID= | cut -d'=' -f 2
echo ${os_name}
libc_version=ldd --version | grep ldd | cut -d' ' -f 4
libc_version_num=echo "${libc_version}" | tr '.' ' '
libc_version_m=0
libc_version_b=0
libc_lower=false
localhost:~ # bash /opt/apps/com.alibabainc.dingtalk/files/Elevator.sh
“opensuse-leap”
“opensuse-leap” branch
preload_libs=
frome cef_dll_wrapp api_hash: 83f3053840abba3b83e43ade58230f10b48591dd
[9830:9830:2023/09/17 01:59:17:INFO:storage.cpp(62)] open storage time=2 ,name=GlobalStorage
……
跳出登录对话框了,能用了
四、将软件类型 Chat 修改为 InstantMessaging;Network
localhost:~ # cat /usr/share/applications/com.alibabainc.dingtalk.desktop
[Desktop Entry]
Categories=Chat;
Comment=
Exec=/opt/apps/com.alibabainc.dingtalk/files/Elevator.sh %u
GenericName=dingtalk
Icon=/opt/apps/com.alibabainc.dingtalk/files/logo.ico
Keywords=dingtalk;
MimeType=x-scheme-handler/dingtalk;
Name=钉钉
Type=Application
X-Deepin-Vendor=user-custom
localhost:~ # sed -n ‘s/Chat/InstantMessaging;Network/p’ /usr/share/applications/com.alibabainc.dingtalk.desktop
Categories=InstantMessaging;Network;
localhost:~ # sed -i ‘s/Chat/InstantMessaging;Network/’ /usr/share/applications/com.alibabainc.dingtalk.desktop
简单的方法是自己使用 VIM 或者 gedit 文本编辑软件打开 com.alibabainc.dingtalk.desktop 修改 Chat 成 InstantMessaging;Network 再保存就行了,这里使用 sed 操作
localhost:~ # cat /usr/share/applications/com.alibabainc.dingtalk.desktop
[Desktop Entry]
Categories=InstantMessaging;Network;
Comment=
Exec=/opt/apps/com.alibabainc.dingtalk/files/Elevator.sh %u
GenericName=dingtalk
Icon=/opt/apps/com.alibabainc.dingtalk/files/logo.ico
Keywords=dingtalk;
MimeType=x-scheme-handler/dingtalk;
Name=钉钉
Type=Application
X-Deepin-Vendor=user-custom
可以让普通用户正式使用了
应用程序——互联网——钉钉——出现登录对话框——单击左上角的二维码图标——出现二维码——勾选自动登录
安卓手机——钉钉——右上角的加号图标——右上角的扫一扫——扫描屏幕中的二维码——桌面版登录确认
五、删除钉钉
localhost:~ # dpkg --remove com.alibabainc.dingtalk
–remove 表示删除包,但保留配置文件。
–purge 表示删除包,且删除配置文件。
localhost:~ # dpkg --purge com.alibabainc.dingtalk
(Reading database … 3650 files and directories currently installed.)
Removing com.alibabainc.dingtalk (7.0.40.30829) …
/home/lost+found
/home/ruhong
/home/ruhong/桌面/com.alibabainc.dingtalk.desktop
/home/suozhang
/home/suozhang/桌面/com.alibabainc.dingtalk.desktop
Purging configuration files for com.alibabainc.dingtalk (7.0.40.30829) …
/home/lost+found
/home/ruhong
/home/suozhang
dpkg: warning: while removing com.alibabainc.dingtalk, directory ‘/usr/share/applications’ not empty so not removed
dpkg: warning: while removing com.alibabainc.dingtalk, directory ‘/opt’ not empty so not removed