<i id='U35JU'><tr id='U35JU'><dt id='U35JU'><q id='U35JU'><span id='U35JU'><b id='U35JU'><form id='U35JU'><ins id='U35JU'></ins><ul id='U35JU'></ul><sub id='U35JU'></sub></form><legend id='U35JU'></legend><bdo id='U35JU'><pre id='U35JU'><center id='U35JU'></center></pre></bdo></b><th id='U35JU'></th></span></q></dt></tr></i><div id='U35JU'><tfoot id='U35JU'></tfoot><dl id='U35JU'><fieldset id='U35JU'></fieldset></dl></div>

  1. <legend id='U35JU'><style id='U35JU'><dir id='U35JU'><q id='U35JU'></q></dir></style></legend>

    <tfoot id='U35JU'></tfoot>
  2. <small id='U35JU'></small><noframes id='U35JU'>

        <bdo id='U35JU'></bdo><ul id='U35JU'></ul>

      “libcrypto.so.1.0.0:未找到版本‘OPENSSL_1.0.1’"在 shell_exec 期

      quot;libcrypto.so.1.0.0: version #39;OPENSSL_1.0.1#39; not found quot; during shell_exec(“libcrypto.so.1.0.0:未找到版本‘OPENSSL_1.0.1’在 shell_exec 期间)

        <legend id='rJ9lX'><style id='rJ9lX'><dir id='rJ9lX'><q id='rJ9lX'></q></dir></style></legend>

          <i id='rJ9lX'><tr id='rJ9lX'><dt id='rJ9lX'><q id='rJ9lX'><span id='rJ9lX'><b id='rJ9lX'><form id='rJ9lX'><ins id='rJ9lX'></ins><ul id='rJ9lX'></ul><sub id='rJ9lX'></sub></form><legend id='rJ9lX'></legend><bdo id='rJ9lX'><pre id='rJ9lX'><center id='rJ9lX'></center></pre></bdo></b><th id='rJ9lX'></th></span></q></dt></tr></i><div id='rJ9lX'><tfoot id='rJ9lX'></tfoot><dl id='rJ9lX'><fieldset id='rJ9lX'></fieldset></dl></div>

          1. <small id='rJ9lX'></small><noframes id='rJ9lX'>

              <bdo id='rJ9lX'></bdo><ul id='rJ9lX'></ul>
                  <tbody id='rJ9lX'></tbody>
                <tfoot id='rJ9lX'></tfoot>

                本文介绍了“libcrypto.so.1.0.0:未找到版本‘OPENSSL_1.0.1’"在 shell_exec 期间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我在 PHP 中使用 shell_exec 运行 git 命令时遇到了一个奇怪的问题.这是 Ubuntu 16.x LTS 的全新映像,仅安装了 Lampp 的副本和 git 包.在我打算 webhook 的 php 脚本中,运行 shell_exec('/usr/bin/git pull 2>&1') 会打印出以下错误.

                I'm running into a bit of a weird issue in PHP using shell_exec to run git commands. This is a brand new image of Ubuntu 16.x LTS with only a copy of Lampp installed and the git packages. Within a php script which I intend to webhook to, running shell_exec('/usr/bin/git pull 2>&1') prints out the following error.

                ssh: /opt/lampp/lib/libcrypto.so.1.0.0: version 'OPENSSL_1.0.1' not found (required by ssh)
                fatal: Could not read from remote repository.`
                

                我可以从命令行使用 git pull 拉取存储库,并且运行 apache 的用户拥有 htdocs 目录中所有文件的所有权.

                I can pull the repository using git pull from the command line and that the user running apache has ownership of all files in the htdocs directory.

                openssl version -a 结果如下:

                OpenSSL 1.0.2g-fips  1 Mar 2016
                built on: reproducible build, date unspecified
                platform: debian-amd64
                options:  bn(64,64) rc4(16x,int) des(idx,cisc,16,int) blowfish(idx)
                compiler: cc -I. -I.. -I../include  -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN
                -DHAVE_DLFCN_H -m64 -DL_ENDIAN -g -O2 -fstack-protector-strong -Wformat -Werror=format-security
                -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wa,--noexecstack -Wall
                -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5
                -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM
                -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM
                OPENSSLDIR: "/usr/lib/ssl"
                

                这是 Lamp 5.6.21 的问题,还是我的设置的问题?

                Is this an issue with the Lamp 5.6.21, or is this an issue with my setup?

                推荐答案

                所以您已经将 XAMPP 安装到 /opt/lampp 并尝试运行本机(如来自 Ubuntu,而不是 XAMPP)git通过 shell_exec().这个shell运行的环境是什么?这是 XAMPP 与 LD_LIBRARY_PATH 一起使用的环境 /opt/lampp/lib,这是所有 XAMPP 组件绝对需要的(因为它们被构建为使用来自 /opt/lampp/lib 的这些库)代码>/opt/lampp/lib).然后 git 继承了这个相同的环境并且(尽管它在 /lib/x86_64-linux-gnu 的某个地方有来自 Ubuntu 的完美的 openssl 库)尝试使用来自 /opt/lampp/lib 的库代码>,砰.

                So you have XAMPP installed into /opt/lampp and trying to run native (as in coming from Ubuntu, not XAMPP) git via shell_exec(). What is the environment this shell runs in? It's the environment that XAMPP uses with LD_LIBRARY_PATH set /opt/lampp/lib, which is absolutely needed for all XAMPP components (because they're built to use these libraries from /opt/lampp/lib). Then git inherits this same environment and (although it has perfect openssl library from Ubuntu somewhere in /lib/x86_64-linux-gnu) tries to use libraries from /opt/lampp/lib, bang.

                您只需要在 git 调用之前清除 LD_LIBRARY_PATH 环境变量,例如:

                What you need is just to clear LD_LIBRARY_PATH environment variable prior to git invocation, like:

                $oldldpath = getenv('LD_LIBRARY_PATH');
                putenv("LD_LIBRARY_PATH=");
                shell_exec('/usr/bin/git pull 2>&1');
                putenv("LD_LIBRARY_PATH=$oldldpath");
                

                这篇关于“libcrypto.so.1.0.0:未找到版本‘OPENSSL_1.0.1’"在 shell_exec 期间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                  <tbody id='xQ2Ct'></tbody>

              • <legend id='xQ2Ct'><style id='xQ2Ct'><dir id='xQ2Ct'><q id='xQ2Ct'></q></dir></style></legend>
                  <bdo id='xQ2Ct'></bdo><ul id='xQ2Ct'></ul>

                    <small id='xQ2Ct'></small><noframes id='xQ2Ct'>

                          <i id='xQ2Ct'><tr id='xQ2Ct'><dt id='xQ2Ct'><q id='xQ2Ct'><span id='xQ2Ct'><b id='xQ2Ct'><form id='xQ2Ct'><ins id='xQ2Ct'></ins><ul id='xQ2Ct'></ul><sub id='xQ2Ct'></sub></form><legend id='xQ2Ct'></legend><bdo id='xQ2Ct'><pre id='xQ2Ct'><center id='xQ2Ct'></center></pre></bdo></b><th id='xQ2Ct'></th></span></q></dt></tr></i><div id='xQ2Ct'><tfoot id='xQ2Ct'></tfoot><dl id='xQ2Ct'><fieldset id='xQ2Ct'></fieldset></dl></div>
                        1. <tfoot id='xQ2Ct'></tfoot>