Heroku的Windows工具带和LD_LIBRARY_PATH [英] Heroku's Windows toolbelt and LD_LIBRARY_PATH

查看:140
本文介绍了Heroku的Windows工具带和LD_LIBRARY_PATH的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Heroku上部署了一个PHP应用程序,我需要使用CLI来运行一些任务。
为了做到这一点,我必须使用以下命令设置LD_LIBRARY_PATH env变量:
heroku config:add LD_LIBRARY_PATH = / app / php / ext:/ app / apache / lib
但是每次我这样做时,toolbelt都会覆盖命令,变量指向 C:\程序文件(x86)\Git\app\php\\ \\ ext; C:\程序文件(x86)\Git\app\apache\lib 。显然它不好。有没有人有任何想法如何正确地做到这一点?

一个href =http://www.mingw.org/wiki/Posix_path_conversion =nofollow>记录msys的行为(我假设你在msysgit shell中运行这个)。您可以在不同的shell(例如Powershell)中运行该命令,或者在路径开始时使用'//',如下所示:

  heroku config:add LD_LIBRARY_PATH = // app / php / ext:// app / apache / lib 

在Linux上使用路径时,这不会造成问题。


I'm deploying a PHP application on Heroku and I need to run some tasks using CLI. In order to do that I have to set LD_LIBRARY_PATH env variable using this command: heroku config:add LD_LIBRARY_PATH=/app/php/ext:/app/apache/lib but every time I do it toolbelt overrides the command and the variable points to C:\Program Files (x86)\Git\app\php\ext;C:\Program Files (x86)\Git\app\apache\lib. Obviously it's not okay. Does anyone have any ideas how to do this in proper way?

解决方案

This is actually not a problem with Heroku toolbelt, it's documented behavior by msys (I'm assuming you're running this in the msysgit shell). You can either run the command in a different shell (eg. Powershell) or use '//' at the start of the path like this:

heroku config:add LD_LIBRARY_PATH=//app/php/ext://app/apache/lib

This won't cause problems when the path is used on Linux.

这篇关于Heroku的Windows工具带和LD_LIBRARY_PATH的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆