apt install을 사용하여 deb 패키지 설치

apt install을 사용하여 deb 패키지 설치

이전 버전의 deb 패키지가 설치되어 있지 않다면 다음을 apt install통해 설치하는 것이 맞습니다. 하지만 이전 버전의 deb 패키지가 시스템에 설치되어 있으면 오류가 발생합니다.

chmod: cannot access '/opt/mplc4_installer/install.sh': No such file or directory
dpkg: error processing package mplc4-oni-plc-w (--configure):
 installed mplc4-oni-plc-w package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 mplc4-oni-plc-w

내 postinst 스크립트:

#!/usr/bin/env bash
set -Eeu
chmod u+x opt/mplc4_installer/install.sh
cd opt/mplc4_installer/
./install.sh > /dev/null 2>&1
exit $?

관련 정보