2013-07-10 232 views
1

所以我加了一個安裝腳本,以我自己的回購在此鏈接: https://github.com/quinnliu/Install_Scripts/blob/master/install_node_and_NPMwget命令無法正常工作

,但是當我輸入wget的我得到了正確的名稱,但一大堆的.html代碼,而不是一個文件的安裝命令。任何人有任何想法爲什麼?

下面是該文件,我得到的開頭:

<!DOCTYPE html> 
<html> 
    <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# githubog: http://ogp.me/ns/fb/githubog#"> 
<meta charset='utf-8'> 
<meta http-equiv="X-UA-Compatible" content="IE=edge"> 
    <title>Install_Scripts/install_node_and_NPM at master <C2><B7> quinnliu/Install_Scripts <C2><B7> GitHub</title> 
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub" /> 
<link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub" /> 
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-114.png" /> 
+0

我想你想通過它傳遞您發佈的URL下載使用wget的安裝腳本。但是,如果你實際上包含了你用來生成該html文件的_exact_命令行,那將會好很多。 –

回答

0

正如人們所說的,你需要的原始鏈接

$ wget -qO- raw.github.com/quinnliu/Install_Scripts/master/install_node_and_NPM 

#!/bin/bash 

sudo apt-get update 

# Install a special package 
$ sudo apt-get install -y python-software-properties python g++ make 

# Add a new repository for apt-get to search 
$ sudo add-apt-repository ppa:chris-lea/node.js 

# Update apt-get's knowledge of which packages are where 
$ sudo apt-get update 

# Now install nodejs and npm 
sudo apt-get install -y nodejs 
sudo apt-get install npm