关于cygwin的“-$'\r': command not found和syntax error: unexpected end of file

要开发android NDK,装了cygwin,改了bash_profile文件

NDK=/cygdrive/e/android-ndk-r5

export NDK

cygwin报错:

“-bash: $'\r': command not found

-bash: $'\r': command not found
-bash: $'\r': command not found

-bash: /home/lenovo/.bash_profile: line 47: syntax error: unexpected end of file

cd $NDK 不出路径,百度后,蛋疼。

最后我的解决办法:

1、去cygwin下etc\skel或etc\defaolts\etc\skel文件下复制一个bash_profile,拷到C:\cygwin\home\Administrator(就是该失败的那个)。

重启cygwin,会发现,一切从头开始了。

2、下一个UltraEdit,安装然后用UltraEdit打开C:\cygwin\home\Administrator下的bash_profile文件(选中文件-》单击鼠标右键-》从目录中选择UItraEdit),修改

NDK=/cygdrive/e/android-ndk-r5

export NDK

3、再UltraEdit打开一下C:\cygwin\home\Administrator下的bashrc(有的电脑不需要)。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值