우분투(Ubuntu) 를 부팅하고 난 후에 로그인을 하면 몇개의 새로운 업데이트가 있는지를 알려준다. 그래서 새로운 패키지 설치를 위해서 ‘apt upgrade’ 명령을 하게 되면 다음과 같은 오류 메시지를 만나곤 한다. 패키지를 설치하는 명령어인 dpkg 명령어가 이미 실행중인 것으로 인해서 실행이 안된다는 것이다. 실행을 할때에 lock 파일을 생성하게 되는데, 이를 근거로 혹시 다른 것이 이미 실행되고 있는건 아닌지 추측하고 있다. 도대체 무슨 일이 벌어지고 있는 걸까? 다른 것이 이미 실행중일지도 모르니까 다음과 같이 프로세스를 체크해 본다. 보아하니 apt.systemd.daily 이것이 apt 명령어를 실행하고 그래서 […]
HowTo, Linux
패키지내에 파일 보기
패키지를 설치하기전에 그 패키지에 어떤 파일들이 들어 있는지를 알고 싶을때가 있습니다. Ubuntu, CentOS 에서 명령어로 모두 가능합니다. Ubuntu 의 경우 Ubuntu 에서는 apt-file 명령어로 간단하게 가능합니다. 설치 설치는 다음과 같이 ‘apt-get’ 명령어로 간단하게 됩니다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
root@ubuntu:~# apt-get install apt-file 패키지 목록을 읽는 중입니다... 완료 의존성 트리를 만드는 중입니다 상태 정보를 읽는 중입니다... 완료 다음 패키지를 더 설치할 것입니다: libapt-pkg-perl libconfig-file-perl liblist-moreutils-perl libregexp-assemble-perl 다음 새 패키지를 설치할 것입니다: apt-file libapt-pkg-perl libconfig-file-perl liblist-moreutils-perl libregexp-assemble-perl 0개 업그레이드, 5개 새로 설치, 0개 제거 및 3개 업그레이드 안 함. 253 k바이트 아카이브를 받아야 합니다. 이 작업 후 870 k바이트의 디스크 공간을 더 사용하게 됩니다. 계속 하시겠습니까? [Y/n] y |
File 리스트 업데이트 파일 내역들을 업데이트를 다음과 같이 해줍니다.
1 2 3 4 5 6 7 8 |
root@ubuntu:~# apt-file update Downloading complete file http://kr.archive.ubuntu.com/ubuntu/dists/trusty/Contents-amd64.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 28.0M 100 28.0M 0 0 8397k 0 0:00:03 0:00:03 --:--:-- 8396k Downloading complete file http://kr.archive.ubuntu.com/ubuntu/dists/trusty-updates/Contents-amd64.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed |
패키지에 File 리스트 보기 다음과 같이 간단하게 살펴볼 수 있습니다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
root@ubuntu:~# apt-file list ntp ntp: /etc/apparmor.d/tunables/ntpd ntp: /etc/apparmor.d/usr.sbin.ntpd ntp: /etc/apparmor/init/network-interface-security/usr.sbin.ntpd ntp: /etc/cron.daily/ntp ntp: /etc/default/ntp ntp: /etc/dhcp/dhclient-exit-hooks.d/ntp ntp: /etc/init.d/ntp ntp: /etc/ntp.conf ntp: /usr/bin/ntpdc ntp: /usr/bin/ntpq ntp: /usr/bin/ntpsweep ntp: /usr/bin/ntptrace ntp: /usr/bin/sntp ntp: /usr/sbin/ntp-keygen ntp: /usr/sbin/ntp-wait ntp: /usr/sbin/ntpd ntp: /usr/sbin/ntptime ntp: /usr/share/apport/package-hooks/source_ntp.py ntp: /usr/share/doc/ntp/NEWS.Debian.gz ntp: /usr/share/doc/ntp/NEWS.gz ntp: /usr/share/doc/ntp/README.Debian.gz ntp: /usr/share/doc/ntp/README.refclocks ntp: /usr/share/doc/ntp/README.versions ntp: /usr/share/doc/ntp/changelog.Debian.gz ntp: /usr/share/doc/ntp/copyright ntp: /usr/share/man/man1/ntpdc.1.gz ntp: /usr/share/man/man1/ntpq.1.gz ntp: /usr/share/man/man1/ntpsweep.1.gz ntp: /usr/share/man/man1/ntptrace.1.gz ntp: /usr/share/man/man1/sntp.1.gz ntp: /usr/share/man/man5/ntp.conf.5.gz ntp: /usr/share/man/man8/ntp-keygen.8.gz ntp: /usr/share/man/man8/ntp-wait.8.gz ntp: /usr/share/man/man8/ntpd.8.gz ntp: /usr/share/man/man8/ntptime.8.gz |
CentOS 의 경우 CentOS 에는 repoquery 명령어로 가능합니다. 이는 yum-utils 를 설치하면 있습니다. 설치 yum 명령어로 yum-utils 설치 가능합니다.
1 |
]# yum install yum-utils -y |
파일 보기 파일 보기는 […]