在 Linux 上编译 Shrew

在 Linux 上编译 Shrew

我正在努力建立泼妇VPN版本 2.2.1Debian 7.1;然而,我遇到了一个无法解决的问题。

README.TXT说我需要使用构建建立泼妇客户...

运行 Linux 平台的 cmake 配置时建议使用以下选项。请参阅 OPTIONS 部分了解更多详细信息。

cmake -DCMAKE_INSTALL_PREFIX=/usr -DQTGUI=YES -DETCDIR=/etc -DNATT=YES

当我尝试运行这个

[mpenning@Mudslide ike]$ cmake -DCMAKE_INSTALL_PREFIX=/usr -DQTGUI=YES \
> -DETCDIR=/etc -DNATT=YES
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: Error required internal CMake variable not set, cmake may 
be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may 
be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module 
 file:/home/mpenning/src/ike/CMakeFiles/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may 
be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may 
be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module 
 file:/home/mpenning/src/ike/CMakeFiles/CMakeCXXCompiler.cmake
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
[mpenning@Mudslide ike]$

答案1

我找到了解决方案......我遗漏了:

  • g++
  • make

这些帮助我解决了第一个错误;然而,修复该错误后,出现了几个其他依赖项。最终安装这些使编译成功...

  • flex
  • bison
  • libssl-dev
  • libedit-dev

之后,我禁用了Qt依赖项(因为我不想膨胀),并且配置没有问题......

[mpenning@Mudslide ike]$ cmake -DCMAKE_INSTALL_PREFIX=/usr \
>  -DQTGUI=NO -DETCDIR=/etc -DNATT=YES
-- Using install prefix /usr ...
-- Using etc install path /etc ...
-- Using bin install path /usr/bin ...
-- Using sbin install path /usr/sbin ...
-- Using lib install path /usr/lib ...
-- Using man install path /usr/local/man ...
-- Using library -lpthread
-- Using binary /usr/bin/flex ...
-- Using binary /usr/bin/bison ...
-- Enabled NAT Traversal support ...
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mpenning/src/ike
[mpenning@Mudslide ike]$ 

之后,makesudo make install正确编译和安装...

[mpenning@Mudslide ike]$ which ikec
/usr/bin/ikec
[mpenning@Mudslide ike]$ ikec -h
ii : ## : VPN Connect, ver 2.2.1
## : Copyright 2013 Shrew Soft Inc.
## : press the <h> key for help
!! : invalid parameters specified ...
>> : ikec -r "name" [ -u <user> ][ -p <pass> ][ -a ]
 -r     site configuration path
 -u     connection user name
 -p     connection user password
 -a     auto connect
[mpenning@Mudslide ike]$

相关内容