星期二, 1月 09, 2018

[Linux] subprocess installed post-installation script returned error exit status 1


在用dpkg安裝deb時,會發生個script的錯誤。
看起來是之前移除前,某些script發生問題,
導致下次你要重新安裝時,會把這問題再report出來,
安裝就會失敗。

解決方法:
這些執行過的script會放在“/var/lib/dpkg/info/” 下面,
所以我只要去那裡把有問題的檔名砍掉就可以了。

Command:
rm /var/lib/dpkg/info/restsdk.postrm


Error message:
root@test:/media/Public# sudo dpkg -i RestSDK.deb
Selecting previously unselected package restsdk.
(Reading database ... 51283 files and directories currently installed.)
Preparing to replace restsdk 1.03-1.5.0.72 (using RestSDK.deb) ...
Unpacking replacement restsdk ...
fusermount: failed to unmount /media/5927277f-c17c-9b4a-958a-ae89ac48e6ff/Public/sdk/restsdk-data/userRoots: Invalid argument
dpkg: warning: subprocess old post-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
fusermount: failed to unmount /media/5927277f-c17c-9b4a-958a-ae89ac48e6ff/Public/sdk/restsdk-data/userRoots: Invalid argument
dpkg: error processing RestSDK.deb (--install):
 subprocess new post-removal script returned error exit status 1
fusermount: failed to unmount /media/5927277f-c17c-9b4a-958a-ae89ac48e6ff/Public/sdk/restsdk-data/userRoots: Invalid argument
dpkg: error while cleaning up:
 subprocess new post-removal script returned error exit status 1
Errors were encountered while processing:
 RestSDK.deb

沒有留言: