본문 바로가기

유용한 디버깅 팁/crash utility and vmcore

[crash-utility] 컴파일 에러: curses.h: No such file or directory!

< 환경: 라즈베리 파이(aarch32) >
 
'crash-utility' 소스를 빌드하면 아래와 같은 에러를 만난다.
 
gcc -c -g -DARM -D_FILE_OFFSET_BITS=64 -DGDB_10_2 -g -O2 build_data.c
gcc -c -g -DARM -D_FILE_OFFSET_BITS=64 -DGDB_10_2 -g -O2 main.c
main.c:20:10: fatal error: curses.h: No such file or directory
 #include <curses.h>
          ^~~~~~~~~~
compilation terminated.
make[5]: *** [Makefile:336: main.o] Error 1
 
curses 라이브러리가 설치되지 않았을 때 이런 에러가 발생한다.
다음 커맨드를 사용해 curses 라이브러리를 설치하면 컴파일 에러가 발생하지 않는다.
 
root@raspberrypi:/home/pi/osc_work/src_crash/crash# apt-get install libncurses5-dev libncursesw5-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gconf-service gconf2-common libexiv2-14 libgconf-2-4 libgfortran3 libgmime-2.6-0 libncurses5 libssl1.0.2 uuid-dev vlc-l10n vlc-plugin-notify
  vlc-plugin-samba vlc-plugin-video-splitter vlc-plugin-visualization
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libncurses-dev
Suggested packages:
  ncurses-doc
The following NEW packages will be installed:
  libncurses-dev libncurses5-dev libncursesw5-dev
0 upgraded, 3 newly installed, 0 to remove and 23 not upgraded.
Need to get 280 kB of archives.
After this operation, 1,730 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y