linux - 在 linux 中执行 perl 脚本给出 :Exec format error. Wrong Architecture

标签 linux perl

我有 perl 脚本,一旦我在 Windows 中编辑它,它曾经工作得很好 并将其转换为 UTF-8,然后通过 FTP 将其返回。 还做了:

chmod +x foo.pl

然后当我尝试运行它时:

 ./foo.pl
im getting this error:
./foo.pl: Exec format error. Wrong Architecture.

什么?什么错误的架构?这是怎么回事?

最佳答案

这很可能是由于 Windows 风格的行尾。要解决,在 unix 提示符下:vi foo.pl 然后 :set ff=unix 然后 :wq 保存并退出。

关于linux - 在 linux 中执行 perl 脚本给出 :Exec format error. Wrong Architecture,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24864736/

相关文章:

linux - 进程已经运行错误

python - 在 python 中使用 os.popen 转换 linux 命令

java - MySQL JDBC 与 Perl DBI

perl - 如何使用 Perl $dbh->tables 获取每个表的单行?

perl - 从另一个文件中的列表替换文件中的文本?

linux - DOMJudge安装: compile script not generating proper permissions

java - 如何像在后台那个目录中一样执行脚本(例如 mvnw)?

linux - 无法在 Linux 中的 NW 0.13 上打开 DevTools

perl - 我什么时候应该使用 `use` ?

perl - 当在 Perl Tk gui 中进行选择时,如何启用禁用的上下文菜单项?