![Linux 드라이버 설치 오류 - "/lib/modules/2.6.18-194.el5/build: 해당 파일이나 디렉터리가 없습니다. 멈추다."](https://rvso.com/image/1345270/Linux%20%EB%93%9C%EB%9D%BC%EC%9D%B4%EB%B2%84%20%EC%84%A4%EC%B9%98%20%EC%98%A4%EB%A5%98%20-%20%22%2Flib%2Fmodules%2F2.6.18-194.el5%2Fbuild%3A%20%ED%95%B4%EB%8B%B9%20%ED%8C%8C%EC%9D%BC%EC%9D%B4%EB%82%98%20%EB%94%94%EB%A0%89%ED%84%B0%EB%A6%AC%EA%B0%80%20%EC%97%86%EC%8A%B5%EB%8B%88%EB%8B%A4.%20%EB%A9%88%EC%B6%94%EB%8B%A4.%22.png)
"/lib/modules/2.6.18-194.el5/build: 해당 파일이나 디렉터리가 없습니다. 중지하세요." 오류가 발생했습니다. moxa 드라이버를 설치하는 동안 다음은 쉘 스크린샷입니다. 해결 방법을 도와주세요. 시간 내 줘서 고마워 !
[root@lnx149-252 driver]# pwd
/root/moxa/mxu11x0/driver
[root@lnx149-252 driver]# ls
Makefile mxu1110_fw.h mxu1130_fw.h mxu1131_fw.h mxu1150_fw.h mxu1151_fw.h mxu11x0.c mxu11x0.h usb-serial.h
[root@lnx149-252 driver]# make clean
rm -f *.o
rm -f .*.o.cmd
rm -f *.symvers
rm -rf ./.tmp_versions
rm -f mxu11x0.mod*
rm -f .mxu11x0*
rm -f mxu11x0.ko
[root@lnx149-252 driver]# make install
*******************************************************************
# MOXA UPort 1110/1130/1150/1150I USB to Serial Hub Driver v1.2 #
# for Linux Kernel 2.6.x #
# #
# release date : 03/23/2009 #
*******************************************************************
make -C /lib/modules/2.6.18-194.el5/build SUBDIRS=/root/moxa/mxu11x0/driver modules
make: *** /lib/modules/2.6.18-194.el5/build: No such file or directory. Stop.
make: *** [module] Error 2
[root@lnx149-252 driver]#
[root@lnx149-252 driver]# uname -a
Linux lnx149-252 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:43 EDT 2010 i686 i686 i386 GNU/Linux
[root@lnx149-252 driver]# uname -r
2.6.18-194.el5
[root@lnx149-252 driver]#
답변1
이 드라이버에 대한 소스 코드가 없고 매우 오래된 시스템을 실행하고 있지만 아마도 설치 전에 기본 빌드 옵션을 실행하지 않도록 Makefile이 잘못 구성되었기 때문일 것입니다.
너무 많은 Makefile이 이 작업을 잘못 수행하기 때문에 일반적인 절차는 다음과 같습니다.
make clean
make
make install
두 번째 호출에서는 개체 파일을 빌드하는 make
기본 빌드 단계(기본적으로)를 호출합니다 . 컴파일을 수행하는 규칙이나 규칙 에 의존하지 않으면 작동하지 않을 수 있습니다 . 쉘 출력 어디에도 실제로 컴파일 중이거나 컴파일을 시도 중이라는 내용이 없으므로 이것이 해결책일 가능성이 높습니다.all
make install
all