편집하다:

편집하다:

저는 32비트 CentOS 7을 실행하고 있습니다. 소스에서 tesseract를 설치하려고합니다. g++ 버전 4.8.5를 사용하고 있는데 컴파일하는 동안 오류가 발생합니다(다음과 같습니다).이것) 소스에서 g++를 업데이트하려고 합니다. 몇 가지 문제를 겪은 후 성공적으로 설치했고 g++ -v버전이 10.0.0이라는 메시지를 받았습니다.

그러나 maketesseract 폴더 내에서 실행하면 오류가 변경되지 않습니다.

이전 버전이 /usr/bin/에 설치되어 있는 동안 새 g++가 /usr/local/bin/에 설치되어 있음을 발견했습니다. 그래서 (이것이 정말 안 좋을 수 있다는 것을 알지만...) 백업/usr/bin을 만들었습니다. 대신 /g++를 선택하고 새 버전(/usr/local/bin/에서)을 복사하세요. make새로운 오류가 표시되기 시작합니다.

checking for g++... g++
checking whether the C++ compiler works... no
configure: error: in `/home/lambda/Téléchargements/tesseract':
configure: error: C++ compiler cannot create executables
See `config.log' for more details
make: *** [config.status] Erreur 77

config.log를 확인하고 싶은데 너무 깁니다. 그런데 이 부분이 재미있을 것 같다고 생각했어요.

configure:2592: checking for g++
configure:2608: found /bin/g++
configure:2619: result: g++
configure:2646: checking for C++ compiler version
configure:2655: g++ --version >&5
g++ (GCC) 10.0.0 20191014 (experimental)

g++를 사용하여 간단한 hello world 프로그램을 컴파일하려고 했는데 잘 작동합니다.

도움을 주시면 감사하겠습니다! 저는 초보자라서 간단한 것을 잊어버렸을 수도 있습니다.

편집하다:

다음은 흥미로울 수 있는 config.log의 또 다른 부분입니다.

configure:2686: checking whether the C++ compiler works
configure:2708: g++    conftest.cpp  >&5
g++: fatal error: cannot execute 'cc1plus': execvp: No such file or directory
compilation terminated.
configure:2712: $? = 1
configure:2750: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "tesseract"
| #define PACKAGE_TARNAME "tesseract"
| #define PACKAGE_VERSION "5.0.0-alpha"
| #define PACKAGE_STRING "tesseract 5.0.0-alpha"
| #define PACKAGE_BUGREPORT "https://github.com/tesseract-ocr/tesseract/issues"
| #define PACKAGE_URL "https://github.com/tesseract-ocr/tesseract/"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:2755: error: in `/home/lambda/Téléchargements/tesseract':
configure:2757: error: C++ compiler cannot create executables

답변1

글쎄, 나는 방법을 찾았습니다.

뿐만 아니라:

make

나는 다음을 사용하려고합니다 :

make CXX=/usr/local/bin/g++

그것은 내 문제를 해결했습니다 ...

관련 정보