[Linux][ubuntu][Perl]bad interpreter: No such file or directory
2015-09-10 11:06
836 查看
在windows 系统上 写了个perl脚本来给 android 手机做压力测试。但是放到linux 系统上work 起来不是很友好。
该脚本放到 ubuntu 1204 64bit 系统上执行时会报如下错误:
然后对该脚本用 dos2unix 进行格式转化,
发现 ubuntu 默认未安装 dos2unix
安装完 dos2unix 后,重新执行
然后再执行脚本文件,脚本完美的在ubuntu上执行。
该脚本放到 ubuntu 1204 64bit 系统上执行时会报如下错误:
$ ./adb_script.pl bash: ./adb_script.pl: /usr/bin/perl^M: bad interpreter: No such file or directory
然后对该脚本用 dos2unix 进行格式转化,
$ dos2unix ./adb_script.pl The program 'dos2unix' is currently not installed. To run 'dos2unix' please ask your administrator to install the package 'dos2unix'
发现 ubuntu 默认未安装 dos2unix
$ sudo apt-get install dos2unix [sudo] password for user: Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: dos2unix 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 60.1 kB of archives. After this operation, 246 kB of additional disk space will be used. Get:1 http://mirrors.163.com/ubuntu/ precise/universe dos2unix amd64 5.3.1-1 [60.1 kB] Fetched 60.1 kB in 0s (2,893 kB/s) Selecting previously unselected package dos2unix. (Reading database ... 207091 files and directories currently installed.) Unpacking dos2unix (from .../dos2unix_5.3.1-1_amd64.deb) ... Processing triggers for man-db ... Setting up dos2unix (5.3.1-1) ...
安装完 dos2unix 后,重新执行
$ dos2unix ./adb_script.pl dos2unix: converting file ./adb_script.pl to Unix format ...
然后再执行脚本文件,脚本完美的在ubuntu上执行。
$ ./adb_script.pl adb_device_check start...
相关文章推荐
- Install VMWare Tools Ubuntu Server
- Linux下如何进行FTP设置
- linux下terminal快捷键
- CentOS6.5安装和配置RabbitMQ3.5.4
- 使Linux终端朗读文字的小技巧分享
- Linux重启中init6与reboot的区别
- CentOS更改yum源
- Linux常用命令——笔记
- Linux管理常用命令
- Linux下rz/sz安装及使用方法
- Linux驱动加载顺序
- 每日一linux命令--查看linux系统版本命令
- linux命令:ftp
- Archlinux安装vim并配置颜色
- CentOS 6 日期 时间,时区,设置修改及时间同步
- 构建Xenomai的Linux实时系统
- Linux 串口使用
- 【1】基于TQ2440的MP3设计——【3、建立Linux 嵌入式交叉开发环境】
- 让CentOS默认生成core dump
- centos关闭防火前