2013-07-10 176 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