在Loongnix上安装clamav,按照下面操作
Unix from source (v0.104+) - ClamAV Documentation
其中没有安装dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm这一行,先继续看看
dnf install cmake
按clamav cmake报错
[root@bogon build]# cmake ..
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "/root/clamav/clamav-1.0.4/build/CMakeFiles/CMakeOutput.log".
dnf install g++ make
[root@bogon build]# cmake ..
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:24 (project):
No CMAKE_CXX_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
又装一票c++之类
[root@bogon build]# cmake ..
-- The CXX compiler identification is GNU 8.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find Git (missing: GIT_EXECUTABLE)
-- Rust tool `cargo` not found.
-- Rust tool `rustc` found: /usr/bin/rustc, 1.58.1
-- Rust tool `rustup` not found.
-- Rust tool `rust-gdb` not found.
-- Rust tool `rust-lldb` not found.
-- Rust tool `rustdoc` found: /usr/bin/rustdoc, 1.58.1
-- Rust tool `rustfmt` not found.
-- Rust tool `bindgen` not found.
-- Rust's native static libs: -lgcc_s;-lutil;-lrt;-lpthread;-lm;-ldl;-lc
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
Could NOT find Rust (missing: cargo_EXECUTABLE)
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE)
cmake/FindRust.cmake:483 (find_package_handle_standard_args)
CMakeLists.txt:137 (find_package)
安装git,以及rust一大堆,注意安装dnf install时增加了--nobest以及要把包名写全
装了一大疙瘩,终于到了cmake --build .
报了个错,
package `bindgen v0.65.1` cannot be built because it requires rustc 1.60.0 or newer, while the currently active rustc version is 1.57.0
运行rustc --version 1.57.0
暂时不再编译了。
=====231031
昨天编译clamav 0.103成功,运行成功