lddtree - TypeError: 'type' object is not subscriptable
lddtree를 사용하기 위해 pax-utils를 설치 후,
$ sudo apt install pax-utils
실행했더니 이런 오류가 발생합니다.
$ lddtree /lib/x86_64-linux-gnu/libc.so.6
Traceback (most recent call last):
File "/usr/bin/lddtree", line 60, in <module>
from elftools.common import exceptions
ModuleNotFoundError: No module named 'elftools'
파이썬으로 만들어진 툴이었군요, ^^
$ pip install pyelftools
Collecting pyelftools
Using cached pyelftools-0.32-py3-none-any.whl.metadata (372 bytes)
Using cached pyelftools-0.32-py3-none-any.whl (188 kB)
Installing collected packages: pyelftools
Successfully installed pyelftools-0.32
하지만, 그래도 여전히 오류가 발생합니다.
$ lddtree /lib/x86_64-linux-gnu/libc.so.6
Traceback (most recent call last):
File "/usr/bin/lddtree", line 128, in <module>
def dedupe(items: list[str]) -> list[str]:
TypeError: 'type' object is not subscriptable
왜냐하면 type hint는 파이썬 3.9부터 지원하기 때문이니, 현재 사용 중인 파이썬 버전을 업데이트하면 됩니다.
[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]