使用OpenSSL生成证书,构建根证书前,需要构建随机数文件(.rand),命令如下:

openssl rand -out private/.rand 

报错如下:

OpenSSL> rand -out private\.rand
Can't open private\.rand for writing, No such file or directory
:error::system library:fopen:No such process:crypto\bio\bss_file.c:
:fopen('private\.rand','wb')
:error:2006D080:BIO routines:BIO_new_file:no such file:crypto\bio\bss_file.c
::
error in rand

竟然找不到路径

查看了OpenSSL的cfg文件也没错

无奈,直接使用了绝对路径,命令如下:

OpenSSL> rand -out C:\CA\private\.rand 

搞定!

原因分析:

因为把openssl放入了path,因此,在cmd命令行下输入openssl后,回车,进入openssl的命令行,默认在%OPENSSL_HOME%\bin\目录下了

执行openssl rand -out XXX命令时,不需要前的openssl,只需要输入rand -out XX即可

问题来了,我的第一个命令:rand -out private\.rand 1000 ,使用的是相对路径(openssl的工作目录是C:\CA),肯定在%OPENSSL_HOME%\bin\目录下找不到

因此,解决方案二:

cd  C:C/CA

openssl -out private\.rand 1000

搞定!(注意命令前必须有openssl)

OpenSSL命令参考:

OpenSSL构建数字证书

No such file or directory 8356:error:02001003:system library:fopen:No such process:crypto\bio\bss_file.c:7 4:fopen的更多相关文章

  1. CMake error:System Error:No such file or directory CMake error:Could not open file for write in copy operation xxxx.ros_Config.cmake.tmp.

    微型电脑或嵌入式与电脑还是有点不同的,在微型电脑上ros indigo 版本下利用catkin编译如果你遇到如下错误: CMake error:System Error:No such file or ...

  2. pip install mysql-python报错1. Unable to find vcvarsall.bat 2 fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory 3.error: command 'mt.exe' failed with exit statu

    最近在安装mysql -python 时报错折腾了半天,通过以下方法解决: 1. pip install mysql-python报错 Unable to find vcvarsall.bat (参考 ...

  3. armv7a-mediatek451_001_vfp-linux-gnueabi-gcc: directory: No such file or directory 编译error

    release/vm_linux/output/hisense_android/mt5399_cn_android_JB/rel/obj/oss/source/arm_mali_ko/mali400- ...

  4. centos6.9安装xampp后报错:egrep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

    1.centos6.9安装xampp(xampp-linux-x64-7.0.21-0-installer.run)后启动的时候,报错: egrep: error while loading shar ...

  5. fatal error C1083: Cannot open include file: '_defs.h': No such file or directory

    b-PAC SDK: https://www.baidu.com/link?url=p6FcG0fvFl6XJf9QdSFLBP16eaS03jOQsdr0zd8cYprHWwqVy5t53bzMrA ...

  6. Mac 配置 php-fpm 时出现'/private/etc/php-fpm.conf': No such file or directory (2)

    https://github.com/musicode/test/issues/5 Mac 自带 php-fpm,在终端执行 php-fpm,会报如下错误: ERROR: failed to open ...

  7. tar 解压bz2报错 Cannot exec: No such file or directory

    tar: bzip2: Cannot exec: No such file or directorytar: Error is not recoverable: exiting now 需要安装bzi ...

  8. 错误: libstdc++.so.6: cannot open shared object file: No such file or directory

    解压完别人提供的openwrt代码,编译时,出现如下错误: # configuration written to .config#mips-openwrt-linux-uclibc-gcc: erro ...

  9. python3: error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory

    安装python3遇到报错: wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz ./configure --prefix=/u ...

随机推荐

  1. win10电脑的USB接口插上U盘以后不能使用?

    今天刚遇到的问题 解决方法如下: 右击“我的电脑”选“属性”,打开“设备管理器”,双击“通用串行总线控制器”,双击任意一个,打开属性对话框,切换到“电源管理”选项卡,去除“允许计算机关闭这个设备以节约 ...

  2. Naive Operations

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6315 学习博客:https://blog.csdn.net/SunMoonVocano/article ...

  3. 3dsmax 卸载/安装失败/出错 2019/2018/2017/2016/2015/2013/2012

    AUTO Uninstaller 更新下载地址 1.选择3dsmax 2.选择版本 3.点击“开始卸载”

  4. (转)shell中test命令方法详解

    test命令用法.功能:检查文件和比较值 shell中test命令方法详解 原文:https://www.cnblogs.com/guanyf/p/7553940.html 1)判断表达式 if te ...

  5. http学习笔记(二):URL和资源

    2.1浏览因特网资源 ------------总结:方案.主机.路径 方案:http,FTP,SMTP等 http(超文本传输协议)是一个基于请求与响应模式的.无状态的.应用层的协议,常基于TCP的连 ...

  6. plsql窗口列表保持

    使用plsql窗口列表保持方法如下: 1.工具——首选项——用户界面——自动保存桌面 选一下此项就保存你当前的窗口布局了,下次启动就不用再设置了. 英语版自己对照.

  7. 前端性能优化-Cookie

    什么是Cookie Cookie可以理解成为浏览器内部存储数据的一个数据库,并会随请求一起被发送:Cookie以键-值对的形式存在.可以存储网站的一些数据,这部分数据不会随着浏览器关闭而被清除.如下图 ...

  8. OC与JS交互之UIWebView

    随着H5的强大,hybrid app已经成为当前互联网的大方向,单纯的native app和web app在某些方面显得就很劣势.关于H5的发展史,这里有一篇文章推荐给大家,今天我们来学习最基础的基于 ...

  9. IDEA学习中的参考资料

    下载安装破解:https://www.cnblogs.com/wang1024/p/7485758.html FIntelliJ-IDEA13基础教程: http://static.runoob.co ...

  10. FlexPaper查看Flash文件

    HTML 代码: <head> <meta http-equiv="Content-Type" content="text/html; charset= ...