![apt install을 사용하여 deb 패키지 설치](https://linux55.com/image/225170/apt%20install%EC%9D%84%20%EC%82%AC%EC%9A%A9%ED%95%98%EC%97%AC%20deb%20%ED%8C%A8%ED%82%A4%EC%A7%80%20%EC%84%A4%EC%B9%98.png)
이전 버전의 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 $?