使用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. oracle merge into函数中插入clob字段

    当使用Merge into 函数向ORACLE数据库中插入或更新数据时,报错“ORA-01461: 仅可以为插入 LONG 列的 LONG 值赋值”,使用如下方法可以把String转换为clob. 需 ...

  2. 3DMAx Panda Directx Exporter 导出 X插件

    Panda Directx Exporter 下载地址 http://www.andytather.co.uk/Panda/directxmax_downloads.aspx 将下载的文件解压后,放到 ...

  3. ajax动态给select赋值

    <select name="elements" id="ele" style="width: 145px;">          ...

  4. Java基础03-类型转换

    1.自动转换 int->double char->String 例:double a=10; 2.强制类型转换 (类型名)表达式 注意:String不能强制转化为char public c ...

  5. Flume启动错误之:Bootstrap Servers must be specified

    今天测试项目的时候需要启动Flume,然而在启动时遇到了Bootstrap Servers must be specified错误,错误日志如下: [kfk@bigdata-pro01 flume-- ...

  6. zookeeper开源客户端curator

    zookeeper的原生api相对来说比较繁琐,比如:对节点添加监听事件,当监听触发后,我们需要再次手动添加监听,否则监听只生效一次:再比如,断线重连也需要我们手动代码来判断处理等等.对于curato ...

  7. 实例化php类的时候如何传参

    当我们实例化一个php类的时候,要怎么传递参数呢?这取决于该类的构造方法. 例: person.class.php <?php class person{ var $name; var $col ...

  8. windows中的ubuntu

    摘要 windows的cmd 实在是太难用,对于码农来说还是喜欢linux的命令行,功能强大:但是linux下的办公软件又没有windows下的强大,在windows下安装个虚拟机吧太卡了: 所以出了 ...

  9. java.lang.ArrayIndexOutOfBoundsException: 160

    项目突然出现这个问题java.lang.ArrayIndexOutOfBoundsException: 160,找了好大半天没有找出来哪里的问题,最后发现时fastjson.jar 版本太低了造成的, ...

  10. C#本期本周的算法

    C#根据当前时间获取,本周,本月,本季度等时间段 DateTime dt = DateTime.Now; //当前时间 DateTime startWeek = dt.AddDays( - Conve ...