请问debian10 dpkg出现脚本进程返回错误咋解决

because@debian:~/Downloads$ sudo dpkg -i sunloginclient-11.0.0.36662-amd64.deb
(Reading database … 196096 files and directories currently installed.)
Preparing to unpack sunloginclient-11.0.0.36662-amd64.deb …
unknown os
sunloginclient: no process found
Sunlogin stopped
Unpacking sunloginclient (11.0.0.36662) over (11.0.0.36662) …
Setting up sunloginclient (11.0.0.36662) …
Error:unknown OS it not impl
Installation failed
dpkg: error processing package sunloginclient (–install):
installed sunloginclient package post-installation script subprocess returned error exit status 1
Processing triggers for gnome-menus (3.31.4-3) …
Processing triggers for desktop-file-utils (0.23-4) …
Processing triggers for mime-support (3.62) …
Errors were encountered while processing:
sunloginclient

你这感觉是用了什么不清真的第三方包啊

额,我是在官网下的,可能向日葵不支持debian吧,怎么都安不上去

installed sunloginclient package post-installation script subprocess returned error exit status 1

看起来问题出在包提供的postinst脚本上,我拆包以后发现……

if [ $os_name == 'ubuntu' ] || [ $os_name == 'deepin' ] || [ $os_name == 'kylin' ]; then
	echo $os_name > /dev/null 2>&1
else
	echoAndExit 'unknown OS it not impl'
fi

估计是不支持debian,只支持deepin和Ubuntu,我想Ubuntu和debian差不得,所以才觉得能装的,它报错说未知系统,看出它应该识别不了debian吧

你可以把包解开,修改一下上面的脚本,然后重新打包,再安装

额,不会写,我是新手。上面的兄弟把包打开了,但是咋写啊

参照以下步骤:

  1. 下载 .deb 软件包
  2. 执行命令 dpkg-deb -R ./sunloginclient-11.0.0.36662-amd64.deb sunloginclient
  3. 进入 sunloginclient 文件夹,编辑软件包内容
  4. 回到软件包所在目录,执行命令dpkg-deb -b sunloginclient sunloginclient-11.0.0.36662-fixed-amd64.deb
  5. 执行命令 sudo apt ./sunloginclient-11.0.0.36662-fixed-amd64.deb
2 个赞

我是直接修改那个文件,我用的linuxmint,我就改成了这样

if [ $os_name == ‘ubuntu’ ] || [ $os_name == ‘deepin’ ] || [ $os_name == ‘kylin’ ] || [ $os_name == ‘mint’ ]; then