솔루션 1

솔루션 1

Debian/Ubuntu에서 구성 파일을 복원하거나 다시 설치하는 방법은 무엇입니까?

실수로 파일을 덮어썼습니다 /etc/bluetooth/main.conf. 실행하면 dpkg -S /etc/bluetooth/main.conf패키지가 bluez제공하는 것으로 표시되지만 실행하면 sudo apt-get install --reinstall bluez다시 설치되지 않습니다.

답변1

솔루션 1

다음 명령을 실행하여 package-name을 패키지 이름으로 바꿉니다.

sudo apt-get -o Dpkg::Options::="--force-confmiss" install --reinstall 패키지 이름

솔루션 2

패키지가 있는 경우 .deb패키지가 있는 디렉터리로 이동하여 실행합니다.

dpkg -i --force-confmiss 패키지 이름.deb

답변2

mv이 파일을 다른 곳으로 옮겨야 합니다 .

mv /etc/bluetooth/main.conf /etc/bluetooth/main.conf.old
apt-get -o DPkg::options::=--force-confmiss --reinstall install bluez

기존 구성 파일을 덮어 쓸 수 있는지 모르기 apt때문에 먼저 해당 파일을 다른 곳으로 옮겨야 합니다.

관련 정보