安裝wdCP v3正式版 sh lanmp.sh 命令無(wú)效,怎么解決?
系統(tǒng)是ubuntu 12 64位。
按照官方教程輸入命令:
1、wget http://dl.wdlinux.cn/files/lanmp_v3.1.tar.gz
2、tar zxvf lanmp_v3.1.tar.gz
3、sh lanmp.sh
第三步的時(shí)候出,這是錯(cuò)誤反饋,求解:
別處找到的答案!
============================
鳥(niǎo)哥的私房菜,里面有講到執(zhí)行shell腳本有兩種方法:
設(shè)置執(zhí)行屬性: chmod 755 file
執(zhí)行(如果已經(jīng)在當(dāng)前目錄) : ./file
使用: sh file 執(zhí)行
.但是在vmware里裝的ubuntu 11.10卻無(wú)法執(zhí)行
#!/bin/bashdeclare -i sfor (( i = 1; i <= 100;i = i+1 ))do s=s+idoneecho "The count is ==> $s"
使用第二種方法執(zhí)行時(shí)出現(xiàn) :
test04_for.sh: 1: declare: not found
test04_for.sh: 3: Syntax error: Bad for loop variable
解決方法:
在終端中輸入:
sudo dpkg-reconfigure dash
然后出現(xiàn)的界面中選擇 NO ,然后就能正確運(yùn)行了。
認(rèn)證0級(jí)講師