如何修改我的cygwin环境使用草莓Perl而不是打包的Perl分布? [英] How can I modify my cygwin environment to use Strawberry Perl instead of the packaged Perl distribution?

查看:221
本文介绍了如何修改我的cygwin环境使用草莓Perl而不是打包的Perl分布?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前使用 Strawberry Perl 作为我的主要Perl发行版。但是,我有一些应用程序通过cygwin使Perl调用。这些通常失败,因为他们调用与cygwin一起打包的Perl版本,并且只查看cygwin的lib文件夹。如何修改我的cygwin环境以调用草莓Perl(并使用C:/ strawberry / perl / lib dirs)?

解决方案

p>如果你不能从cygwin中删除Perl,你可以创建一个符号



从cygwin shell,使用以下命令集:

  $ mv / usr / bin / perl / usr / bin / perl-cygwin 
$ ln -s /cygdrive/c/strawberry/perl/bin/perl.exe / usr / bin / perl

这是假设您使用了默认的Strawberry Perl安装程序。如果您已将其安装在其他位置,请相应地更新您的 perl.exe 位置。



检查以确保链接通过检查Perl版本可以正常工作:

  $ perl -v 

应该说这是perl,(版本)为MSWin32-x86多线程(或类似) 为cygwin-thread-multi-64int 打造。


I currently use Strawberry Perl as my primary Perl distribution. However, I have some applications that make Perl calls through cygwin. These generally fail because they are calling the version of Perl that was packaged with cygwin, and only looking in cygwin's lib folders. How can I modify my cygwin environment to call Strawberry Perl (and use the C:/strawberry/perl/lib dirs) instead?

解决方案

If you remove Perl from cygwin using the setup program it will use Strawberry Perl by default.

If you are unable to remove Perl from cygwin, you can create a symbolic link to the Perl executable from Strawberry.

From a cygwin shell, use the following set of commands:

$ mv /usr/bin/perl /usr/bin/perl-cygwin
$ ln -s /cygdrive/c/strawberry/perl/bin/perl.exe /usr/bin/perl

This is assuming you used the default Strawberry Perl installer. Update your perl.exe location accordingly if you have it installed somewhere else.

Check to make sure the link is working properly by checking the Perl version:

$ perl -v

It should say This is perl, (version) built for MSWin32-x86-multi-thread (or similar) and not built for cygwin-thread-multi-64int.

这篇关于如何修改我的cygwin环境使用草莓Perl而不是打包的Perl分布?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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