This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

Troubleshooting/ko

From Gentoo Wiki (test)
Jump to:navigation Jump to:search
This page is a translated version of the page Troubleshooting and the translation is 67% complete.
Outdated translations are marked like this.

이 페이지의 목적은 사용자에게, 약간의 새로운 기술과 도구로 자신 스스로에게 젠투 설정 과정에서 문제를 찾고 해결할 수 있도록 하는 실마리 제공에 있습니다. 게다가 더 복잡한 문제에 있어서도, 이 게시글은 사용자로 하여금 문제를 해결하는 과정에서 자신 스스로에게 도움을 줄 정보를 수집하는 기법을 제공하려 내용을 살펴봅니다.

This article assumes that the Gentoo Handbook has been read and that there is a basic understanding of using Gentoo.

도움을 받을 곳

젠투는 풍부한 정보를 가지고 있는 몇가지 위키 문서를 보유하고 있습니다. 일부 글이 오래되어 한물간 내용이 있음을 참고하셔야겠지만, 젠투를 사용할 때 위키 글을 쉽게 읽어내려가다보면 항상 어려운 단계에 부딪힙니다.

On IRC, the #gentoo is the recommended channel for general issues. This is probably the fastest way to get an answer.

Since IRC channels require active presence, some users might prefer leaving a message at a forum or mailing list which continues to exist after closing the browser. When an answer pops up, a notification (usually through an e-mail) is sent back.

모든 나머지 경우에 실패했고 젠투를 깨먹는 요소가 있는 것 같다면, 젠투 버그 추적 시스템은 어떤 버그를 이미 보고했는지 살펴보는 좋은 자료가 되거나, 필요한 경우 여기에 새로운 버그 보고서를 작성합니다. 이 방식은 젠투 개발자와 연락이 닿는 가장 효율적인 방법이며 문제 상황을 진전시키고 해결하는 과정에 주어진 실마리를 활용할 수 있습니다.

프로그램

다음은 매우 권장하는 도구 목록입니다:

Package management

Package Description
app-portage/gentoolkit provides a collection of tools for interacting with Gentoo; it includes the valuable equery, eclean, euse and eshowkw, see their man pages for more information.
app-portage/eix provides eix, a tool for querying portage for packages
app-portage/pfl provides e-file, a tool for querying what package contains a given file; it also works for packages that aren't installed since it uses an online lookup.
app-portage/genlop provides genlop, a tool for parsing emerge logs; handy to figure out when certain packages were installed, updated and to see how long they took to compile.
app-portage/elogv provides elogv, a ncurses based interface for browsing emerge logs.

하드웨어

Package Description
sys-apps/pciutils provides lspci, a tool for gathering information about PCI devices.
sys-apps/usbutils provides lsusb, a tool for gathering information about USB devices.

감시

Package Description
sys-process/htop provides htop, a tool for monitoring processes. Like top, but more advanced.
sys-process/iotop provides iotop, a top-like tool for monitoring IO activity by process.
net-analyzer/nettop provides nettop, a top-like tool for examining network traffic by protocol, port, and process.

기타

Package Description
app-text/wgetpaste provides wgetpaste, a tool for uploading text directly to a pastebin.
net-irc/weechat provides weechat, a simple text based IRC client.

첫 단계

문제 상황을 해결 생황으로 이끌어내려면 우선 문제를 잘 이해해야합니다. 해결책을 끌어올리는게 불가능한 일이 아닌 상황에서 문제를 제대로 이해하지 못하면 어려워집니다. 분명하게 말해서, 문제를 자세하게 설명하면, 문제에 대해 정확하게 맞는 해결책을 이끌어낼 수도 있습니다.

문제 인식

이 부분은 꽤 쉬워보이겠지만, 이 부분이 없다면 문제 발견 과정에서 다음으로 넘어갈 수 없습니다.

몇가지를 참고해 두십시오:

  1. 하드웨어의 문제인가? 프로그램의 문제인가?
  2. 이 문제가 일어나기 전에 어떤 동작을 취해서 바뀐 것이 있는가?
  3. 문제에 대한 추가 정보를 모을 수 있는가?

자세한 내용, 기록, 다른 사람이 겪은 적이 있는지 여부 등의 정보를 제공한다면 문제를 살펴보기 편하게 해줍니다.

하드웨어 문제

드라이버

하드웨어의 드라이버 이슈는 IRC에서 종종 회자되는 일반적인 문제 중 하나입니다.

First and foremost, identify what the hardware is that is causing problems. lspci and lsusb are great tools for this purpose. For demonstration purposes, we'll be looking at an Ethernet card as the troublesome device.

적당한 드라이버 찾기

First look with lspci and find the device information:

root #lspci
 03:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8071 PCI-E Gigabit Ethernet Controller (rev 16)

간편하게 줄인 표기 옵션 -n을 사용할 수 있습니다(인터넷에서 검색하는 것보다 쉽습니다).

root #lspci -n
 03:00.0 0200: 11ab:436b (rev 16)

모델 이름(0200)과 제조사/모델 (11ab:436b) 은 리눅스에서 사용하는 올바른 드라이버를 찾을 수 있는 WikiDevi 또는 Debian HCL 사이트 같은 곳에서 장치를 찾아볼 때 사용할 수 있습니다.

드라이버 불러오기 유무 확인

드라이버를 가져오는 일은 반절의 사투도 채 안됩니다. 대부분 드라이버와 얽히는 문제는 제대로 불러와서 동작하는지 확인하는 과정입니다.

Relying on our friend lspci again, run:

root #lspci -k
 03:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8071 PCI-E Gigabit Ethernet Controller (rev 16)
 	Subsystem: Acer Incorporated [ALI] Device 014e
 	Kernel driver in use: sky2

Note that here, an indicator is given that a driver is in use. If not, then no driver has claimed responsibility over this hardware. Assuming the driver was built as a module rather than built-in, try modprobe <modulename> to attempt loading the right module. If the driver was built-in, consider making it a module, because modules can be loaded with modprobe and unloaded with modprobe -r which saves on number reboots while debugging the issue.

드라이버 문제 해결

Compile the driver as a module, then capture the output it generates when the module is loaded. Make sure to first remove all modules that depend on the driver (see lsmod).

The following command will compare the dmesg output after removing the module (in this example, r8169) with the output after adding the module again, effectively showing the messages that were added (lines starting with +).

root #diff -u <(modprobe -r r8169; dmesg) <(sleep 1; modprobe r8169; dmesg) | grep ^+

대부분의 일반적인 문제는 펌웨어가 빠져있는 상태입니다. 메시지에서 펌웨어가 빠져있다고 관리자에게 나타나면 sys-kernel/linux-firmware 또는 포티지에서 특정 펌웨어 꾸러미를 발견하고 설치하십시오. 펌웨어를 설치한 후에는 커널 모듈을 내렸다가 다시 불러와서 문제를 해결했는지 확인하십시오.

프로그램 문제

포티지 문제

의존성 그래프 슬롯 중복

때로는 꾸러미를 이머지할 때 이런 메시지가 뜨는 경우가 있습니다:

코드 의존 그래프 오류
!!! Multiple package instances within a single package slot have been pulled
!!! into the dependency graph, resulting in a slot conflict:

보통 의존성 그래프에서 요청한 버전이 여러개가 있다는 의미입니다. 다행히도 대부분의 경우에는 이게 전부가 아니라면 요청한 버전 중 가장 최신 버전으로 직접 업그레이드 하여 해결할 수 있습니다. 따라서 다음 메시지를 받았다면:

코드 Example of dependency graph error
app-emulation/emul-linux-x86-xlibs:0 
(app-emulation/emul-linux-x86-xlibs-20120127::gentoo, installed) pulled in by 
~app-emulation/emul-linux-x86-xlibs-20120127 required by (app-emulation/emul-linux-x86-medialibs-20120127::gentoo, installed) 
(and 2 more with the same problem) 
 
(app-emulation/emul-linux-x86-xlibs-20120520::gentoo, ebuild scheduled for merge) pulled in by 
>=app-emulation/emul-linux-x86-xlibs-20120520 required by (net-im/skype-2.2.0.35-r99::gentoo, ebuild scheduled for merge) 
~app-emulation/emul-linux-x86-xlibs-20120520 required by (app-emulation/emul-linux-x86-medialibs-20120520::gentoo, ebuild scheduled for merge)

최근 버전은 20120520 입니다. 따라서:

root #emerge --ask --oneshot =app-emulation/emul-linux-x86-xlibs-20120520

Often, it's advantageous to one-shot (--oneshot or -1) all of the conflicts at once because they sometimes depend on one another (see also World set).

또 다른 블록 예제가 있습니다:

코드 블록 중복 예제
app-text/poppler:0
 
 (app-text/poppler-0.24.5::gentoo, installed) pulled in by
   app-text/poppler:0/44=[xpdf-headers(+)] required by (dev-tex/luatex-0.76.0::gentoo, installed)
   app-text/poppler:0/44=[cxx,jpeg,lcms,tiff,xpdf-headers(+)] required by (net-print/cups-filters-1.0.43::gentoo, installed)
 
 (app-text/poppler-0.24.3::gentoo, ebuild scheduled for merge) pulled in by
   >=app-text/poppler-0.12.3-r3:0/43= required by (app-text/texlive-core-2013-r1::gentoo, installed)
   poppler:0/43

poppler 버전을 바꾸는데 문제가 없어야합니다. luatex와 cups-filter는 지정 버전의 poppler가 필요하지 않지만 어떤 버전을 쓰든지 간에 다시 빌드해야합니다:

root #emerge --ask --oneshot =app-text/poppler-0.24.3 dev-tex/luatex net-print/cups-filters


Here is another example that could have resulted in a blockage:

root #emerge --ask --verbose --update --newuse --deep @world
코드 Example of an update conflict
sys-power/cpupower:0

These are the packages that would be merged, in order:

Calculating dependencies... done!

Total: 0 packages, Size of downloads: 0 KiB

WARNING: One or more updates/rebuilds have been skipped due to a dependency conflict:

sys-power/cpupower:0

  (sys-power/cpupower-4.9.0-r1:0/0::gentoo, ebuild scheduled for merge) conflicts with
    <sys-power/cpupower-4.7 required by (mate-base/mate-applets-1.12.1-r4:0/0::gentoo, installed)
    ^                   ^^^

Nothing to merge; quitting.

Portage warns about an update that can not be performed, however, there is no issue because this update is not required by a package. More precisely, the update must be skipped because mate-base/mate-applets-1.12.1-r4 requires a version of sys-power/cpupower package lower than 4.7.

Collecting additional information

When seeking help, more times than never additional information will be asked, such as the output of a command. Some of these produce dozens or hundreds of lines of text - too much to be suitable for pasting into IRC chat rooms, such as the Gentoo support channel on Freenode. That's where wgetpaste comes in handy - it allows users to post short links that contain long output.

app-text/wgetpaste를 설치했는지 확인하십시오:

root #emerge --ask wgetpaste

For instance, to show the contents of /etc/conf.d/net, using wgetpaste is as simple as:

user $wgetpaste /etc/conf.d/net

Or let's say that someone needs the detailed output of an lspci command is:

root #lspci -nnk | wgetpaste

가끔은 표준 오류를 표준 출력으로 나타나게끔 하여 오류 메시지 마찬가지로 붙여넣을 수 있도록 해야 합니다. 다음과 같이 하시면 처리할 수 있습니다:

root #emerge -pv 2>&1 | wgetpaste

이 명령은 누군가에게 도움을 받기 위해 쉽게 공유할 수 있는 pastebin 사이트 페이지 링크를 반환합니다.

붙여넣을때 고려해야 할 사항은:

하드웨어 문제 또는 커널 문제일 경우:

user $wgetpaste /usr/src/linux/.config
  • 포티지 문제일 경우:
root #emerge --verbose --info | wgetpaste
  • 꾸러미 설치 문제일 경우:
root #wgetpaste /var/tmp/portage/<category>/<package>-<version>/temp/build.log
  • Xorg 문제일 경우:
user $wgetpaste /var/log/Xorg.0.log
  • 시스템에 설치한 모든 꾸러미를 제공해야 할 경우:
root #eix-update && eix-installed all

함께 다듬어 놓기

Below is a shell function that can be used to have several commands executed and their output processed by a single wgetpaste command so that only one URL needs to be provided to the user or developer that wants to help out:

root #
execv(){ for cmd in "$@"; do echo -e "\n=== $cmd ===\n"; $cmd; done; }
(execv "cat /etc/*-release" "uname -a" "lspci -nnk" "lsusb" "eselect profile list"\
 "emerge --info" "cat /usr/src/*$(uname -r)/.config" "cat /var/log/Xorg.0.log" "dmesg"\
 "eix-update" "eix-installed all")\
 | wgetpaste

젠투 사용자 메일링 리스트에서는 pastebin 서비스를 활용하지 마십시오

여러곳에서 메일링 리스트 메시지를 보관하고 연 단위로 참조하겠지만서도 대부분 pastebin 서비스는 붙여넣기 내용이 오래된 경우 주기적으로 정리합니다(pastebin 서비스가 상당히 적당하지 않으며, 언제든 서버를 내린다고 하진 않았습니다). 적절한 출력 내용이 짧거나 앞뒤로 자를 수 있다면, 전자메일 본문에 복사하여 붙여넣으십시오. 긴 출력 내용은 텍스트 파일로 넘길 수 있으며 일반 첨부 파일로 추가할 수 있습니다.

해결책 정리

문제 설명문을 알기 쉽게 작성하고, 동작에 대한 모든 기록, 모든 종류의 디버깅 데이터(세부 문제, 하드웨어 / 소프트웨어 정보, 로그, 백트레이스 등) 를 포함한 쓸만한 데이터 모음을 바람직하게 모아두면 해결책을 찾아볼 수 있습니다:

해결책을 찾으려면 다음 과정을 반복합니다:

  • 어디에 문제가 있는지 고민하고, 가능한 원인에 대해 생각하기.
  • 문제를 살펴볼 명백한 구석이 없다면, 관련 영역을 통해 이미 알고 있는 부분을 좀 더 살펴보거나 이 문제에 대해 전문가인 사용자에게 질문하기.
  • 가끔 진행하는데 몇가지를 가정해볼 필요가 있습니다. 가설을 세웠다면 시험에 적용해보십시오. 잘못된 가설 성립은 사용자 및 개발자가 다른 원인을 가려내지 못하게 합니다.
  • 문제 범위내에서 추가 디버깅 정보를 가져오거나 시험을 진행하십시오.

종종 가능한 원인이 여러가지일 수도 있습니다. (실제 원인인지 아닌지)문제를 시험하는게 중요하므로 개별적으로 시험해보십시오. 나누어 해결하기(분할 및 정복)로 보통 알려져 있습니다.

부팅하고 나서 브라우저가 가끔 희멀건 페이지를 보여준다 같은 문제가 나타났다 치고 구체적인 많은 상황에 대해 이미 파악했다면, 가능한 원인 몇가지는 다음과 같습니다:

  • 시스템을 다시 부팅할 때 브라우저를 제대로 닫지 않았습니까?
프로세스를 강제로 끝내보시고 여러번 연결해보신 후 다시 부팅했을 경우 페이지가 희멀겋게 뜨는지 각각의 경우 마다 확인하십시오. 이게 원인이라면 실제 원인인지 다른 원인인지 확인하십시오.
  • 일부 버전의 브라우저가 깨져있는게 아닙니까?
이전에 올라온 버전 또는 새 버전을 사용하든지, 그래도 깨졌다면 다시 부팅하고 확인해보십시오.

등등...

추가 정보를 통해 더 확실한 원인을 생각해볼 수 있습니다:

  • 플러그인 Y를 불러오는 어떤 고정 탭 X가 시스템에 문제를 일으키는가?
탭 고정을 해제하여 실행시 더이상 열지 못하게 하거나 플러그인을 비활성화하십시오, 여전히 문제가 지속되는지 확인하십시오.
  • 그래픽 문제 마찬가지 보고됐는데, 아마도 비디오 카드 드라이버가 문제를 일으키는 것 같다?
드라이버를 다른 버전으로 바꿔보거나, 다른 드라이버가 있다면 그 드라이버를 시도해보십시오.

가능한 갖가지 원인을 찾았다면, 실제 문제의 원인을 좀 더 확실하게 찾아보실 수 있을겁니다.

그럼에도 끄끝내 문제를 못찾았다면, 문서 상단의 도움을 받을 곳 자료에서 도움을 구할 사람이 있는 여러 곳을 찾아볼 수 있습니다. 문제를 상세하게 설명하고, 마찬가지로 무얼 시도했는지 확실하게 언급하여 설명하는 이들이 납득하기 쉽게 하면, 여러분을 구제하는데 도움이 됩니다.

See also