CentOS安装python、Ruby

CentOs版本查看命令:

 lsb_release -a

查看系统位数:

getconf LOGN_BIT

CentOS的软件源未包含有最新的nodejs, 需要手动编译安装。

首先安装依赖的库与工具

  1. yum install libtool automake autoconf gcc-c++ openssl-devel  

然后下载nodejs的源码包tar, 解压缩后直接三板斧编译安装

  1. ./configure --prefix=/usr  
  2. make  
  3. make install  

最后用 node -v和 npm -v 查看安装的版本

到这里其实还没完, 还需要安装 node-gyp 之类的包

  1. npm install -g node-gyp  

npm的另一种安装方式是

  1. wget http://npmjs.org/install.sh  
  2. chmod +x ./install.sh  
  3. ./install.sh  

./configure: No such file or directory

一般情况下,多看看目录下的readme和INSTALL文件,里面会告诉你怎么安装软件。

这里我目前知道可能有两种情况:

1、目录下没有configure,但有configure.am或configure.in时,需要用autoconf命令来生成configure。代码如下:

$cd (软件名) - (版本号)
$autoconf

2、此软件或库安装方式不是按以下套路来安装,

$cd (软件名) - (版本号)
$.
/ configure
$make
$sudo make install

就需要认真阅读文件夹下的相关文件readme等等,按里面写的方式来安装!


Yeoman and Grunt Server Nodej Error

POssible solution for error 
testapp>grunt server
Loading "imagemin.js" tasks...ERROR
>> Error: Cannot find module 'imagemin-gifsicle'


npm -g install [email protected]

OR

npm -g install [email protected]
.4.28

Clear the cache
npm cache clear 

Some of the above fix worked for some users but i found installing msysgit fixed 
the error that i was having when running the grunt server


grunt serve
Loading "imagemin.js" tasks...ERROR
>> Error: Cannot find module 'imagemin-pngquant'

Running "serve" task

Running "clean:server" (clean) task

Running "wiredep:app" (wiredep) task
Warning: ENOENT, no such file or directory 'C:\a\b\c\yup\app\bower.json' Use --force to continue.

Aborted due to warnings.
down vote accepted

I had the same problem try commenting the line 166 in your Gruntfile.js :

I did it and it should look like this :

// Automatically inject Bower components into the app
wiredep: {
  options: {
    //cwd: '<%= yeoman.app %>'
  },

Then run again your server with :

grunt serve

如果还不管用,则还需要运行如下的命令

npm install grunt-contrib-imagemin --save-dev


http://cloudfoundry-doc.csdn.net/frameworks/ruby/installing-ruby.html

http://yeoman.io/learning/deployment.html


在使用yeoman工具链时需要安装一下如下环境:Node.js、Ruby、Compass。


首先来安装Node.js,由于Node在安装时需要依赖于python,且版本不能过低,所以需要先升级python的版本。


1、由于系统自带的python版本较低,可以通过

python -V 查看,所以需要升级,升级步骤如下:


下载/安装python
yum install -y bzip2*           #nodejs 0.8.5需要,请安装python前,先安装此模块。
 
wget http://www.python.org/ftp/python/2.7.3/Python-2.7.9.tgz
tar zvxf Python-2.7.9.tgz
cd Python-2.7.9
./configure
make && make install
/usr/local/bin/python2.7 -V     #查看Python版本
建立软连接,使系统默认的python指向python2.7
正常情况下即使python2.7安装成功后,系统默认指向的python仍然是2.4.3版本,考虑到yum是基于python2.4.3才能正常工作,不敢轻易卸载。


mv /usr/bin/python  /usr/bin/python.bak
ln -s //usr/local/bin/python2.6 /usr/bin/python
python -V    #检验python指向是否成功
解决系统python软链接指向python2.6版本后,yum不能正常工作
$vi /usr/bin/yum
将文本编辑显示的#/usr/bin/python修改为#/usr/bin/python2.4,保存修改即可。


2、安装Ruby


要在centos 中安装ruby,直接使用 sudo yum install ruby 即可。


3、安装Compass


To install Compass on CentOS 6.4 run the following commands:

sudo yum install ruby
sudo yum install rubygems
sudo gem update --system
sudo gem install compass


你曾经试过在CentOS 5.5上面运行 yum install ruby 命令吗?如果你使用的是默认的应用库配置,你会发现你安装的是老版本的Ruby 1.8.5。如果你还没有准备好升级到Ruby 1.9,而是准备安装Ruby 1.8.7,请往下看!

 

[c-sharp]  view plain copy
  1. yum install -y gcc zlib zlib-devel  
  2. wget ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.7-p334.tar.gz  
  3. tar xvf ruby-1.8.7-p334.tar.gz  
  4. cd ruby-1.8.7-p334  
  5. ./configure --enable-pthread  
  6. make  
  7. make install  

 

VMware下的CentOS与Windows7共享目录:

建立挂载命令如下:

mount -t cifs //192.168.81.12/share  share -o username="Administrator",password="你的密码" 


















发布了167 篇原创文章 · 获赞 321 · 访问量 58万+

首先安装依赖的库与工具

  1. yum install libtool automake autoconf gcc-c++ openssl-devel  

然后下载nodejs的源码包tar, 解压缩后直接三板斧编译安装

  1. ./configure --prefix=/usr  
  2. make  
  3. make install  

最后用 node -v和 npm -v 查看安装的版本

到这里其实还没完, 还需要安装 node-gyp 之类的包

  1. npm install -g node-gyp  

npm的另一种安装方式是

  1. wget http://npmjs.org/install.sh  
  2. chmod +x ./install.sh  
  3. ./install.sh  

猜你喜欢

转载自blog.csdn.net/mazhimazh/article/details/42173877
今日推荐