|
|
楼主 |
发表于 2022-10-28 09:52:47
|
显示全部楼层
别人总结的一些错误:& K9 C: T4 }& F; E# u
遇到错误的解决办法:3 o) ?6 p+ o. F! S9 N
错误1:运行./bootstrap时出现报错:3 l b h! u0 L9 n8 t0 g2 A$ u
复制代码9 V$ D; g% g1 a; l
-- Looking for gethostname
# z! a& s1 e* o, P- d1 Z% g-- Looking for gethostname - found
; E! L# Z$ l1 G+ J% W6 z-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR) 2 l( U, R: V: J2 D
CMake Error at Utilities/cmcurl/CMakeLists.txt:454 (message):, h. M# J6 T9 v# k9 ~
Could not find OpenSSL. Install an OpenSSL development package or- z. ~' `; E8 x
configure CMake with -DCMAKE_USE_OPENSSL=OFF to build without OpenSSL.! F; [: S# A; h% Z; i' o
$ H; J ~. e% b( }8 ~$ m; P1 j) @3 V' H+ l! z- {" M/ j* [
-- Configuring incomplete, errors occurred!; p( P7 G- N* }3 @5 a
See also "/home/whlg/cmake-3.16.6/CMakeFiles/CMakeOutput.log".) M$ @- ?; E0 i9 }
See also "/home/whlg/cmake-3.16.6/CMakeFiles/CMakeError.log".
# g+ q" e! ^, d3 m$ y& A( `1 m---------------------------------------------
- o' b" @4 J$ X& Q# ?Error when bootstrapping CMake:
# W5 ]$ S; m* Z h( O1 qProblem while running initial CMake I: b* S1 o# ~) a) ] X2 l1 h
---------------------------------------------
8 t5 b/ _/ Z1 V; r, L2 L. M( v复制代码
, B1 D% k5 R% d+ K5 k2 }0 F" C提示找不到OpenSSL,查看错误日志,缺少软件包。1 Q6 o$ z1 ~' y% m% c/ g1 E% i
# j% a7 W+ n0 l$ o7 J5 z解决方案:) Z8 w; g9 F4 H" W+ j( ~
' E4 P' @5 m* F: B6 w- c
sudo apt-get install libssl-dev6 m# t, g* l: ?+ [$ e1 @& t+ E9 n
再运行' u# e8 x; C, D* O. Y
; T; C! G: k4 w" {/ ^3 i/ \./bootstrap/ V4 ]1 L1 h, {+ [- O' I
错误2:make install时出现报错:
, W4 ^: N# e& T; l q6 j F$ V' z复制代码
# A4 O8 k/ L, a[100%] Built target foo3 m. f' s, O6 c% y9 J' G6 B
Install the project...) x% V0 [' ?2 v7 l5 B
-- Install configuration: ""
( s* c' p! |5 ~1 T5 GCMake Error at Source/kwsys/cmake_install.cmake:41 (file):
; Y, h0 q* [5 Y+ _. t file cannot create directory: /usr/local/doc/cmake-3.16/cmsys. Maybe need
* a9 \: \4 w i% R3 d" c administrative privileges.
7 U' z F9 G) d$ I1 cCall Stack (most recent call first): p% V8 F% g1 v2 Y: X( M2 C; L" t
cmake_install.cmake:42 (include)
* L4 P J: x; m! }" n
5 Z, m. f: d# Q+ x5 j0 q- h
+ x# ]+ J/ V1 r3 wMakefile:76: recipe for target 'install' failed
7 M9 K0 U* `! D4 m4 x: amake: *** [install] Error 1
3 v- w' s- H- j, ?9 c9 E3 b) ~) ^$ {复制代码
. t8 v4 A. J' m) y* v& q! [解决方案:5 I1 E3 _1 K- |+ v3 R; s0 ]- i
% S0 B3 w: a/ J4 esudo make install- Z; L @5 v# s
错误3:执行cmake --version时提示没有那个文件或目录:
- F2 k* O" e* q. y+ I/ @8 ?/ Ibash: /usr/bin/cmake: 没有那个文件或目录
. C* [# v$ \& X5 O: r+ x解决方案:
4 [( U+ I% k$ D: G" L3 t; [$ C
q9 E' h c( w$ i2 h使用which cmake查找cmake的安装路径,默认是在/usr/local/bin/cmake,而系统会默认去/usr/bin中去寻找。, D1 ~* ]7 `8 M, j9 i' F# j
, m, A% G0 ^% f! b. K
做一个链接即可:: J/ h' x7 x4 Q- ]$ K- \) U/ M4 R
, f5 r1 S! g- O; Z
ln -s /usr/local/bin/cmake /usr/bin
0 M8 E8 M' N5 |+ Z提示没有权限的话加上sudo。 |
|