顯示具有 install 標籤的文章。 顯示所有文章
顯示具有 install 標籤的文章。 顯示所有文章

2013年1月3日 星期四

升級到OSX 10.8 (Mountain Lion)後,pip使用遇到問題

升級之後,使用pip安裝套件,卻出現下面這種狀況。
Traceback (most recent call last):
  File "/usr/local/bin/pip", line 5, in 
    from pkg_resources import load_entry_point
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in 
    working_set.require(__requires__)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: pip==1.1
這時候要做的事情很容易,只需要把pip做升級,就可以解決這個問題。
sudo easy_install -U pip
Reference: stackoverflow

2012年7月8日 星期日

[Solved] CentOS 5.5做yum install ant遇到Missing Dependency: /usr/bin/rebuild-security-providers is needed by package java-1.4.2-gcj-compat-1.4.2.0-40jpp.115.x86_64

做yum install ant的時候遇到以下的錯誤:
--> Finished Dependency Resolution
java-1.4.2-gcj-compat-1.4.2.0-40jpp.115.x86_64 from installed has depsolving problems
  --> Missing Dependency: /usr/bin/rebuild-security-providers is needed by package java-1.4.2-gcj-compat-1.4.2.0-40jpp.115.x86_64 (installed)
Error: Missing Dependency: /usr/bin/rebuild-security-providers is needed by package java-1.4.2-gcj-compat-1.4.2.0-40jpp.115.x86_64 (installed)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.
解決方法是這樣的,把缺乏的jpackage-utils-compat-el5安裝進去即可:
rpm -Uvh http://plone.lucidsolutions.co.nz/linux/centos/images/jpackage-utils-compat-el5-0.0.1-1.noarch.rpm
或者是
rpm -Uvh https://github.com/downloads/pallet/pallet/jpackage-utils-compat-el5-0.0.1-1.noarch.rpm
Reference: plone

2012年7月1日 星期日

CentOS上安裝yasm

rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
yum -y update
yum -y install yasm
Reference: razuna

2012年4月1日 星期日

在OSX上使用Play Framework

# 首先是使用Homebrew作Play Framework的安裝,很多套件安裝都透過它一行指令就搞定
brew install play

# 用Play創造一個app,指定名稱、是Java/Scala/Empty project,就okay了
play new appName

# 試著執行看看,可以在http://localhost:9000看到應用程式已經跑起來
cd appName/
play
run

# 為了讓Eclipse可以import這個project,必須產生一些Eclipse對應的檔案
play eclipsify
Reference: Play Framework

2012年2月28日 星期二

Mac上使用pip安裝httpie

使用pip安裝Python package非常簡單,只要以下步驟:
# 安裝pip
sudo easy_install pip

# 安裝httpie
sudo pip install httpie
Reference: Python Guide

2011年11月11日 星期五

用Homebrew安裝CouchDB

# 安裝指令
brew install couchdb

# 啟動 CouchDB 並且背景執行
couchdb -b

# 打開管理頁面,time to relax
http://127.0.0.1:5984/_utils/index.html

# 關閉 CouchDB
couchdb -k

2011年9月1日 星期四

Maven: 安裝3rd party的函式庫,以wax_1.0.4.jar為例

經常會有在Maven Repository上找不到,專案上又需要的函式庫,這個時候就必須要自己安裝這個函式庫
mvn install:install-file -DgroupId=java.ociweb -DartifactId=wax 
-Dversion=1.0.4 -Dpackaging=jar    -Dfile=/path/to/file/wax_1.0.4.jar 
-Dpackaging=jar -DgeneratePom=true -DcreateChecksum=true

pom.xml也做對應的修改


	java.ociweb
	wax
	1.0.4

2011年7月26日 星期二

Mac的套件管理工具 Homebrew

# install brew
ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"

# install packages (e.g. install wget)
# all packages are installed at /usr/local/Cellar folder
brew install wget

# update, search, list all installed packages
brew update
brew search ${KEY_WORD}
brew list

Reference: Homebrew

2011年7月6日 星期三

CentOS 5.5 安裝 Jetty6

yum search jetty
yum install jetty6-noarch
 
# 若遇到Missing Dependency錯誤,就安裝jpackage-utils-compat-el5-0.0.1-1.noarch.rpm
##################################################################################
# Error: Missing Dependency: 
# /usr/bin/rebuild-security-providers is needed by 
# package java-1.4.2-gcj-compat-1.4.2.0-40jpp.115.x86_64 (installed)
##################################################################################
rpm -Uvh http://plone.lucidsolutions.co.nz/linux/centos/images/jpackage-utils-compat-el5-0.0.1-1.noarch.rpm
Reference: oxxus, Plone

2011年6月8日 星期三

在CentOS安裝 JDK 6u27 及 Tomcat 7

########################################################
# Java JDK Installation
########################################################

# Download JDK 6u27 from Java.net, http://goo.gl/mOT4y
sh jdk-6u27-ea-bin-b01-linux-amd64-18_may_2011-rpm
alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_27/jre/bin/java 20000
alternatives --install /usr/bin/javac javac /usr/java/jdk1.6.0_27/bin/javac 20000

# Choose jdk1.6.0.27 as the java option
alternatives --config java

export JAVA_HOME="/usr/java/jdk1.6.0_27"


########################################################
# Tomcat 7 Installation
########################################################

# Install Tomcat 7
wget http://apache.mivzakim.net/tomcat/tomcat-7/v7.0.14/bin/apache-tomcat-7.0.14.tar.gz
mv apache-tomcat-7.0.14.tar.gz /usr/share/apache-tomcat-7.0.14.tar.gz 
cd /usr/share
tar -xzf apache-tomcat-7.0.14.tar.gz
rm -rf apache-tomcat-7.0.14.tar.gz

# Configure Tomcat 7 to Run as a Service
cd /etc/init.d
vim tomcat7

The Content of 'tomcat7'
#!/bin/bash
# description: Tomcat Start Stop Restart
# processname: tomcat
# chkconfig: 234 20 80
JAVA_HOME=/usr/java/jdk1.6.0_27
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH
CATALINA_HOME=/usr/share/apache-tomcat-7.0.14


case $1 in
start)
source /root/.bashrc
sh $CATALINA_HOME/bin/catalina.sh jpda run
;;
stop)
sh $CATALINA_HOME/bin/shutdown.sh
;;
restart)
sh $CATALINA_HOME/bin/shutdown.sh
source /root/.bashrc
sh $CATALINA_HOME/bin/catalina.sh jpda run
;;
esac
exit 0

########################################################
# Tomcat 7 Configuration
########################################################

chmod 755 tomcat7
chkconfig --add tomcat7
chkconfig --level 234 tomcat7 on

# Verify The Configuration of Tomcat 7
chkconfig --list tomcat7

# Start/Stop/Restart Tomcat 7
service tomcat7 start
service tomcat7 stop
service tomcat7 restart

Reference: davidghedini.blogspot.com

2011年1月26日 星期三

Show All Installed RPMs on CentOS

# see all installed rpms
rpm -qa

# remove a rpms
rpm -e ${rpm_package_name}

2010年12月16日 星期四

Install Cassandra on Ubuntu 10.10

wget http://apache.ntu.edu.tw//cassandra/0.6.8/apache-cassandra-0.6.8-bin.tar.gz
tar zxf apache-cassandra-0.6.8-bin.tar.gz

cd apache-cassandra-0.6.8/
vim conf/storage-conf.xml
mkdir /var/lib/cassandra
mkdir /var/lib/cassandra/saved_caches
mkdir /var/lib/cassandra/commitlog
mkdir /var/lib/cassandra/data
sudo chmod -R 777 /var/lib/cassandra

# @cassandra folder
bin/cassandra -f

Install Thrift for Java

sudo apt-get install ant
wget http://ftp.tcc.edu.tw/pub/Apache//incubator/thrift/0.5.0-incubating/thrift-0.5.0.tar.gz
tar zxf thrift-0.5.0.tar.gz
cd thrift-0.5.0/lib/java

# install the thrift JAR file to /usr/local/lib/libthrift.jar
sudo ant install
Reference: http://code.google.com/p/thrudb/wiki/UbuntuInstallGuide