Win10_64bit源码nmake方式安装OpenSSL

本文提供了在Windows环境下安装OpenSSL的详细步骤,包括下载Perl、NASM和VisualStudio,配置环境变量,使用PerlConfigure设置平台,通过nmake进行编译、测试和安装。整个过程涉及32位和64位版本的选择,以及针对WindowsonArm的特定版本。安装完成后,通过opensslversion命令验证安装成功。
摘要由CSDN通过智能技术生成

1.概述

官网:

https://www.openssl.org/

 

Quick start
1.Install Perl
2.Install NASM
3.Make sure both Perl and NASM are on your %PATH%
4.Use Visual Studio Developer Command Prompt with administrative privileges, choosing one of its variants depending on the intended 
	rchitecture. Or run cmd and execute vcvarsall.bat with one of the options x86, x86_amd64, x86_arm, x86_arm64, amd64, amd64_x86, 
	amd64_arm, or amd64_arm64. This sets up the environment variables needed for nmake.exe, cl.exe, etc. See also
	https://docs.microsoft.com/cpp/build/building-on-the-command-line

5.From the root of the OpenSSL source directory enter
	perl Configure VC-WIN32 if you want 32-bit OpenSSL or
	perl Configure VC-WIN64A if you want 64-bit OpenSSL or
	perl Configure VC-WIN64-ARM if you want Windows on Arm (win-arm64) OpenSSL or
	perl Configure to let Configure figure out the platform
6.nmake
7.nmake test
8.nmake install

2.安装Perl

官网:

Strawberry Perl for Windows

 

选择zip压缩包最新版本下载。

 

压缩包strawberry-perl-5.32.1.1-64bit.zip解压到合适目录,并配置环境变量。

3.安装NASM

官网:

https://www.nasm.us/

选择最新版本windows64版本zip压缩包,这里是2.16.01。下载后解压

nasm-2.16.01-win64.zip到合适目录并配置环境变量。

4.安装Visual Studio

官网:

Visual Studio: IDE and Code Editor for Software Developers and Teams

安装过程不赘述。

Nmake 需要配置好系统环境变量。

5.下载OpenSSL源码zip包

 

6.根据步骤完成设置

6.1打开visualstudio2019命令行

 

 6.2进入oppensl源码路径

6.3按概述部分中的第5步操作:

5.From the root of the OpenSSL source directory enter
	perl Configure VC-WIN32 if you want 32-bit OpenSSL or
	perl Configure VC-WIN64A if you want 64-bit OpenSSL or
	perl Configure VC-WIN64-ARM if you want Windows on Arm (win-arm64) OpenSSL or
	perl Configure to let Configure figure out the platform

在窗口中输入perl Configure VC-WIN64A,然后回车运行

 接下来就需要等待一会,等待生成一些新的文件。
生成完成之后就会出现 OpenSSL has been successfully configured 的字样。

6.4 使用nmake命令进行编译

在窗口中输入nmake,然后回车
注意,此步骤大概需要30min左右时间

这步往后是用X64 Native Tools Command Prompt管理员身份打开的命令行。

 

6.5 使用nmake test对构建完成之后的模块进行测试

在窗口中输入nmake test,然后回车
注意,此步骤大概需要30min左右时间
如果测试成功,最后一行会出现Result:PASS字样

6.6 安装nmake install

在窗口中输入nmake install,然后回车
注意,此步骤大概需要30min左右时间
此步骤完成之后便可关闭窗口

生成的Openssl在路径 C:/Program Files/OpenSSL中。

选择bin文件夹的路径,将路径复制到环境变量中即可。

7.检验OpenSSL

按住 shift键 鼠标右击桌面,点击“在此处打开powershell窗口”,输入openssl version 查看,如果安装完成,即可显示出openssl当前的版本。至此,就要恭喜你openssl已经在你的电脑上安装完成了!

 

注:visual studio 2019 如果没有安装nmake,则需要自己通过visual studio Installer安装相关的vc++组件。

 

windows安装perl模块方法和必备软件nmake dmake devcpp: 方式一: 将 nmake.exe 放到system32目录下 用一下方式perl Makefile.pl nmake nmake test nmake install 如果成功,将不用看下面内容。 方式二: 手动编译方式 优点:通吃所有模块 缺点:有点麻烦 具体步骤:1安装编译器2设置编译器的环境变量3可能安装dmake 具体方法:如下 1.首先要有个c编译器,推荐dev-cpp(开源免费的,网上自己搜索),记得要下含有mingw的就是了(不懂c,下载含有mingw的因为这个版本的bin目录里有gcc.exe等工具). 1.1安装好了编译器之后,要能在cmd中以命令方式运行的话,必须要设置环境变量,在winxp中[我的电脑]->[属性]->[高级]->[环境变量]里设置,只需要在path里加个你路径,比如你的安装路径是c:\dev-cpp,那你就要加上c:\dev-cpp\bin (path中有很多其他的路径,之间记得用;隔开 )弄完好,在cmd中运行gcc -v 显示出内容表示编译器安装成功,并且可以用命令行编译. 2.编译步骤,在cpan上下载需要的模块,比如Win32::SerialPort,下载好了解压,在cmd中进入这个目录(简单的dos命令应该知道吧),就用常见的方法: perl Makefile.pl make make test make install 如果成功,将不用看下面内容。 方式三: 使用方式make很可能会出现错误,不能编译,找了很多原因,有高人介绍了解决办法,就是下载一个叫dmake的工具,解压缩,将里面的dmake.exe和startup的文件夹(好象是这个名字)一起复制到c:\dev-cpp\bin 里(因为这个目录注册到环境变量里的),之后安装改成: perl Makefile.pl dmake dmake test dmake install 注意: 如果安装过oracle10g你将会发现出现版本冲突的情况。 解决方案如下:修改%PERL5LIB%环境变量,修改为perl所在目录
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值