게시물 1,376건
   
apt-daily.service
글쓴이 : 최고관리자 날짜 : 2017-08-01 (화) 18:12 조회 : 13677
글주소 :
                                
OS : Ubuntu 16.04
증상)
인스턴스를 생성하고 apt-get을 통해 패키지 업데이트를 하려는 도중 에러가 발생
.....................................
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?


# ps aux |grep apt
root      1152  0.0  0.0   4508  1704 ?        Ss   09:56   0:00 /bin/sh /usr/lib/apt/apt.systemd.daily
_apt      1709  4.9  0.2  41996  5660 ?        S    09:56   0:01 /usr/lib/apt/methods/http
root      1713  0.0  0.0  12944  1028 pts/0    S+   09:57   0:00 grep --color=auto apt

원인)
이미 apt-get 를 통해 작업중이면서 lock 이 걸려있는 상태
Ubuntu 16.04에서는 기본으로 systemd timer 를 통해 unattended upgradey (무인업그레이드) 데몬이 제공되어있습니다.

# systemd-analyze 
Startup finished in 3.392s (kernel) + 2min 27.703s (userspace) = 2min 31.096s

# systemd-analyze blame 
      2min 317ms apt-daily.service
         21.680s cloud-init.service
          3.494s cloud-init-local.service
          2.780s cloud-config.service
          2.534s dev-vda1.device
          1.000s lvm2-monitor.service
           878ms apparmor.service
         ...............................
         ...............................

관련파일
/lib/systemd/system/apt-daily.service
/lib/systemd/system/apt-daily.timer

# systemctl disable apt-daily.service
# systemctl disable apt-daily.timer


관련된 자료는 아래 링크를 참고

이름 패스워드
비밀글 (체크하면 글쓴이만 내용을 확인할 수 있습니다.)
왼쪽의 글자를 입력하세요.
   

 



 
사이트명 : 모지리네 | 대표 : 이경현 | 개인커뮤니티 : 랭키닷컴 운영체제(OS) | 경기도 성남시 분당구 | 전자우편 : mojily골뱅이chonnom.com Copyright ⓒ www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.