- 浏览: 155006 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
追求幸福:
每增加一个新的activity, 都要为这个activity指 ...
关于setContentView -
雨过天晴0521:
感谢第一位留言的网友, 我会坚持下去
ADB push的用法 -
小光棍:
謝謝。整理出來的東西真有用!!
ADB push的用法
问题1:今天运行oracle11g enabler的sh脚本时, 遇到error说can't run .../*.sh, 可经过check, 这些sh脚本明明已经被解压到指定path下了, 执行脚本的user和group也都实现创建好了, 没有问题。于是手动去运行一个sh试试, 终于发现了问题, 报错如下:
[oracle11g@sf-redhat-64-4 bin]$ ./startup.sh
bash: ./startup.sh: /bin/sh^M: bad interpreter: No such file or directory
原来是enabler是在windows上从git clone下来, 然后运行maven做成的zip, 结果在windows上用notepad打开过, 文本被转换成了windows格式。具体原因如下:
DOS-based text files use a pair of carriage return (CR) and line feed (LF) as a new-line delimiter. On the other hand, UNIX-based text files simply use LFs to terminate each line. In order to convert a text file from DOS format to UNIX format, you can use a command-line tool called dos2unix.
解决办法:可以去去http://pkgs.org/centos-6-rhel-6/centos-rhel-x86_64/dos2unix-3.1-37.el6.x86_64.rpm.html上下载dos2unix, 运行dos2unix [FILES], 重新转换即可.
有时候在windows下编写的python脚本在linux下也不能运行,也是因为^M的原因,因为windows下行结束符是/r/n,而linux只需要/n. 我们可以使用cat –v来显示一个文本文件中的^M符号,或者如果有非improved的vi版本的话(注意是非improved版本, 否则也显示不出来),也可以直接vi查看。
除了以上用dos2unix工具, 还有个简单的办法替换掉文本中的^M,通常这类文件在vi或vim中下面都会显示dos模式,那么我们直接设置为unix模式就会自动清楚了。方法是:
1. :set fileformat=unix
2. 保存退出
问题2: 下了一个dos2unix的rpm安装包, 可安装时说没有public key
[root@sf-redhat-64-4 michael]# yum install dos2unix-3.1-37.el6.x86_64.rpm Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Examining dos2unix-3.1-37.el6.x86_64.rpm: dos2unix-3.1-37.el6.x86_64
Marking dos2unix-3.1-37.el6.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package dos2unix.x86_64 0:3.1-37.el6 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
dos2unix x86_64 3.1-37.el6 /dos2unix-3.1-37.el6.x86_64 18 k
Transaction Summary
================================================================================
Install 1 Package(s)
Upgrade 0 Package(s)
Total size: 18 k
Installed size: 18 k
Is this ok [y/N]: y
Downloading Packages:
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY
Public key for dos2unix-3.1-37.el6.x86_64.rpm is not installed
解决办法:加上忽略参数--nogpgcheck
[root@sf-redhat-64-4 michael]# yum install dos2unix-3.1-37.el6.x86_64.rpm --nogpgcheck
Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Examining dos2unix-3.1-37.el6.x86_64.rpm: dos2unix-3.1-37.el6.x86_64
Marking dos2unix-3.1-37.el6.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package dos2unix.x86_64 0:3.1-37.el6 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
dos2unix x86_64 3.1-37.el6 /dos2unix-3.1-37.el6.x86_64 18 k
Transaction Summary
================================================================================
Install 1 Package(s)
Upgrade 0 Package(s)
Total size: 18 k
Installed size: 18 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : dos2unix-3.1-37.el6.x86_64 1/1
Installed:
dos2unix.x86_64 0:3.1-37.el6
Complete!
[oracle11g@sf-redhat-64-4 bin]$ ./startup.sh
bash: ./startup.sh: /bin/sh^M: bad interpreter: No such file or directory
原来是enabler是在windows上从git clone下来, 然后运行maven做成的zip, 结果在windows上用notepad打开过, 文本被转换成了windows格式。具体原因如下:
DOS-based text files use a pair of carriage return (CR) and line feed (LF) as a new-line delimiter. On the other hand, UNIX-based text files simply use LFs to terminate each line. In order to convert a text file from DOS format to UNIX format, you can use a command-line tool called dos2unix.
解决办法:可以去去http://pkgs.org/centos-6-rhel-6/centos-rhel-x86_64/dos2unix-3.1-37.el6.x86_64.rpm.html上下载dos2unix, 运行dos2unix [FILES], 重新转换即可.
有时候在windows下编写的python脚本在linux下也不能运行,也是因为^M的原因,因为windows下行结束符是/r/n,而linux只需要/n. 我们可以使用cat –v来显示一个文本文件中的^M符号,或者如果有非improved的vi版本的话(注意是非improved版本, 否则也显示不出来),也可以直接vi查看。
除了以上用dos2unix工具, 还有个简单的办法替换掉文本中的^M,通常这类文件在vi或vim中下面都会显示dos模式,那么我们直接设置为unix模式就会自动清楚了。方法是:
1. :set fileformat=unix
2. 保存退出
问题2: 下了一个dos2unix的rpm安装包, 可安装时说没有public key
[root@sf-redhat-64-4 michael]# yum install dos2unix-3.1-37.el6.x86_64.rpm Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Examining dos2unix-3.1-37.el6.x86_64.rpm: dos2unix-3.1-37.el6.x86_64
Marking dos2unix-3.1-37.el6.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package dos2unix.x86_64 0:3.1-37.el6 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
dos2unix x86_64 3.1-37.el6 /dos2unix-3.1-37.el6.x86_64 18 k
Transaction Summary
================================================================================
Install 1 Package(s)
Upgrade 0 Package(s)
Total size: 18 k
Installed size: 18 k
Is this ok [y/N]: y
Downloading Packages:
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY
Public key for dos2unix-3.1-37.el6.x86_64.rpm is not installed
解决办法:加上忽略参数--nogpgcheck
[root@sf-redhat-64-4 michael]# yum install dos2unix-3.1-37.el6.x86_64.rpm --nogpgcheck
Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Examining dos2unix-3.1-37.el6.x86_64.rpm: dos2unix-3.1-37.el6.x86_64
Marking dos2unix-3.1-37.el6.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package dos2unix.x86_64 0:3.1-37.el6 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
dos2unix x86_64 3.1-37.el6 /dos2unix-3.1-37.el6.x86_64 18 k
Transaction Summary
================================================================================
Install 1 Package(s)
Upgrade 0 Package(s)
Total size: 18 k
Installed size: 18 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : dos2unix-3.1-37.el6.x86_64 1/1
Installed:
dos2unix.x86_64 0:3.1-37.el6
Complete!
发表评论
-
(转)linux防火墙的启动和关闭
2013-08-29 14:14 606昨天在linux服务器上装了一个tomcat,整个过程很顺利, ... -
(转)linux下如何更改主机名
2013-08-16 18:50 957如何修改linux主机名才能生效? 很多人使用hostnam ... -
(转)如何查看linux闲置和占用的内存
2013-08-07 16:33 703在Linux下查看内存我们一般用free命令, 也可以加-m参 ... -
win7下安装cygwin
2013-08-06 15:56 17101.win7 64bit也要下载32bit的setup-x86 ... -
(转) 深入了解JVM
2013-06-14 15:31 782在社会化分工、软件行 ... -
(转) Linux Increase The Maximum Number Of Open Files
2013-03-28 19:18 841Issue: How do I set the maximu ... -
(转)如何让让Linux下程序永远在后台执行
2013-02-28 11:29 883Unix/Linux下一般想让某个程序在后台运行,很多都是使用 ... -
常用linux命令收集
2013-02-18 14:35 6601.(转)如何修改linux主机名? 用hostname命令 ... -
[转]How to determine the exit status of Linux and UNIX command
2012-12-01 21:36 754Shell: How to determine the exi ... -
如何查看父进程
2012-11-01 15:17 1669看父进程PPID和子进程PID [root@silver-i ... -
(转)Solaris 10 常用命令
2012-09-20 16:12 1300如何查看当前在线用户? 可以使用who和finger显示当前 ... -
Linux 常用网络命令介绍
2012-05-31 15:26 87今天在安装完vsphere后配置centOS虚拟机, 安装 ... -
如何查看Linux的版本位数
2012-03-06 11:35 1123方法1. getconf LONG_BIT and getco ... -
[转]CPU位数、操作系统位数和编译器位数关系
2011-09-22 09:58 971随着近来AMD和Intel的64位CPU以及 Microsof ... -
如何判断Solaris和SolarisX86是运行在32位还是64位模式下
2011-09-21 17:53 1130-bash-3.00$ man isainfo Reforma ... -
sed替换properties文件的值
2011-09-01 20:16 2872oracle9.properties文件内容如下, 想要将us ... -
自动化安装和启动DS脚本
2011-08-10 18:31 983#!/bin/sh #fabric broker pat ... -
执行*.sh时出现bad interpreter错误
2011-08-04 11:57 822出现bad interpreter:No such f ...
相关推荐
使用yum安装gcc,C语言编译环境,编程环境的搭建,C++编程环境。
yum install python-pip 后来google了一下说是这个包在EPEL源里,要添加EPEL源才可以。然后按博客里说的方法添加,执行以下命令: sudo rpm -ivh epel-release* 但是最后提示系统里已经安装了最新的epel包,但为...
好莱坞Hollywood FX4.58+卡通特效插件
qpid rpm包 带依赖 直接yum localinstall qpid-cpp-server-1.39.0-1.el7.x86_64.rpm 就能安装
[root@xxx yum.repos.d]# yum install -y kubelet kubeadm kubectl Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile kubernetes | 1.4 kB 00:00:00 No package kubelet available. No ...
1.如果安装到第三步出错的话一般是yum有问题, 看文件夹内的替换文件名称为: CentOS-Base.repo 打开路径为:/etc/yum.repos.d/ 上传好后使用命令: mkdir /opt/centos-yum.bak mv /etc/yum.repos.d/* /opt/centos-...
安装依赖库 sudo yum install libQt3Support.so.4 libQtCore.so.4 libQtGui.so.4 2、 安装cutecom-0.22.0-1.puias6.i686.rpm,需要权限请在前面加上sudo,如下命令安装 sudo rpm -i cutecom-0.22.0-1.puias6.i686....
1. 安装gcc(centos 7之后一般已自带,可以在第6步失败后再安装) yum install gcc gcc-c++ 2. 安装pcre yum install -y pcre pcre-devel 3. 安装zlib yum install -y zlib zlib-devel 4. 安装openssl yum ...
red hat 下安装g++,使用yum install ** 安装失败,直接使用安装包安装。
Ansible安装开始安装前,一般会安装失败,先配置镜象执行命令安装yum install -y ansible 查看版本看是否安装成功4. 设置hostvi
此软件须在电脑上使用,可通过qq发送给别人。无病毒,对电脑无危害,
3、yum安装 (RedHat、CentOS) 4、apt-get安装 (debian,ubuntu) 以安装gcc为例,登陆https://gcc.gnu.org/,下载自己想要的版本的gcc安装包 上传gcc-4.1.2.tar.gz到Linux服务器任意目录,解压 解压目录执行...
在本篇文章里小编给大家整理的是关于linux输入yum后提示: -bash: /usr/bin/yum: No such file or directory的解决方法,有需要的朋友们参考下。
1、官网下载安装包 ... 切换到/usr/local目录,下载软件包 ...先执行以下命令,安装nginx依赖库,如果缺少依赖库,可能会安装失败,具体可以参考文章后面的错误提示信息。 # yum install gcc-c++ # yum install pcre
若有些包已安装,则会提示下载失败,此时单独使用reinstall命令下载已安装的包即可,如: yum reinstall --downloadonly --downloaddir=/apps/docker-ce-v18 \ libseccomp 包下载完成后,存放在/apps/docker-ce...
这里以centos7为例: 首先加载光盘 随后挂载光盘 mount /dev/cdrom /mnt cd /mnt 随后把东西拷贝到本地 ...mkdir -p /centos/mnt ...name=CentOS-install-packs baseurl=file:///centos/mnt/mnt gpgcheck=0 e
接着输入yum install mysql命令 再输入这个命令yum install mysql-server 如果发生了报错是没有安装wget 输入yum -y install wget命令 接着再输入: wget ...
开始安装mysql数据库 yum install mysql-server -y ⽹速慢的话安装过程可能需要多花点时间,耐⼼等待就好! 出现如上图所⽰的时候说明已经安装好了 7.更改登录的账号⽤户权限为顶级root权限 chown -R root:root /var...
一、系统环境 yum update升级以后的系统版本为 [root@yl-web yl]# cat /etc/redhat-release ...安装mysql和mysql-devel都成功,但是安装mysql-server失败,如下: [root@yl-web yl]# yum install mysql-server Loaded
网上关于CentOS系统下安装Metasploit的教程一堆有一堆,我这里也没有什么新意,完全是一步一步的走一遍,算是做个笔记,往后备查。... yum install sqlite-devel libxslt-devel libxml2-devel java-1.7.0-op