Perl 和 CopSSH

发布于 2024-07-24 10:12:21 字数 191 浏览 4 评论 0 原文

我正在尝试使用 python 脚本在远程计算机上自动化进程。 该机器是一台 Windows 机器,我在其上安装了 CopSSH,以便通过 SSH 进入它来运行命令。 我无法从 CopSSH 终端运行 perl 脚本。 我收到命令未找到错误。 有没有一种特殊的方法,我必须安装 perl 才能做到这一点? 或者有人知道如何用 CopSSH 安装 perl 吗?

I'm trying to automate a process on a remote machine using a python script. The machine is a windows machine and I've installed CopSSH on it in order to SSH into it to run commands. I'm having trouble getting perl scripts to run from the CopSSH terminal. I get a command not found error. Is there a special way that I have to have perl installed in order to do this? Or does anyone know how to install perl with CopSSH?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

捶死心动 2024-07-31 10:12:21

我怀疑 CopSSH 为您提供了与普通 GUI 登录不同的环境变量。 我建议您输入“set”并查看 perl 是否在路径中以及它可能需要的任何其他环境变量。

以下是设置 CopSSH 用户环境的一些说明。 它可能有用。

I suspect CopSSH is giving you different environment vars to a normal GUI login. I'd suggest you type 'set' and see if perl is in the path with any other environment vars it might need.

Here is some explanation of setting up the CopSSH user environment. It may be of use.

糖粟与秋泊 2024-07-31 10:12:21

我刚刚意识到 CopSSH 基于 Cygwin,我认为这意味着必须以不同的方式指定路径。 例如,尝试使用

/cygdrive/c/Program\ Files/My\ Program/myprog.exe

而不是

"C:\Program Files\My Program\myprog.exe"代码>.

顺便说一句,以下 CopSSH 常见问题解答也可能适用: http://www.itefix.no/ i2/节点/31

I just realized CopSSH is based on Cygwin which I think means paths would have to be specified differently. Try using, for example,

/cygdrive/c/Program\ Files/My\ Program/myprog.exe

instead of

"C:\Program Files\My Program\myprog.exe".

BTW, the following CopSSH FAQ might be applicable as well: http://www.itefix.no/i2/node/31.

池予 2024-07-31 10:12:21

您使用的是 ActiveState草莓 Perl? 您收到什么错误消息? 您可能会找到如何使用 Strawberry Perl 运行程序 有帮助。

Are you using ActiveState or Strawberry Perl? What error messages are you getting? You may find the answers to How do I run programs with Strawberry Perl helpful.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文