其實要在Ubuntu上編譯安裝mcrouter不難
官方都已經寫好shell script了
如果遇到
官方都已經寫好shell script了
安裝mcrouter
#cd /opt #sudo apt-get install git #sudo git clone https://github.com/facebook/mcrouter.git #cd /opt/mcrouter/mcrouter/scripts #./install_ubuntu_14.04.sh /home/$USER/mcrouter-install/ -j4正常應該會直接跑到完
如果遇到
autom4te: cannot create autom4te.cache: No such file or directory aclocal: error: echo failed with exit status: 1 autoreconf: aclocal failed with exit status: 1補一句sudo讓他繼續跑,後面做的事情就必須用手動繼續
#cd /opt/mcrouter/mcrouter/ #sudo autoreconf --install #sudo ./configure #sudo make #sudo make install
測試
./mcrouter找不到 libthrift.so
./mcrouter: error while loading shared libraries: libthrift.so.15: cannot open shared object file: No such file or directory來個軟連結
#sudo ln -s /usr/local/lib/libthrift.so /lib/libthrift.so或是修改你的ldconfig
#sudo vim /etc/ld.so.conf 加入一行 /usr/local/lib/ #sudo ldconfig
安裝 google-glog
configure: error: Please install google-glog library
#sudo mkdir -p /opt/google-glog #cd /opt/google-glog #sudo wget https://google-glog.googlecode.com/files/glog-0.3.3.tar.gz #sudo tar -zxvf glog-0.3.3.tar.gz #cd glog-0.3.3 #sudo ./configure #sudo make #sudo make install
安裝google-gflags
configure: error: Please install google-gflags library
#sudo mkdir -p /opt/google-gflags #cd /opt/google-gflags #sudo wget https://gflags.googlecode.com/archive/v2.1.1.tar.gz #sudo tar -zxvf v2.1.1.tar.gz #cd gflags-v2.1.1/ #sudo cmake -DBUILD_SHARED_LIBS=true . #sudo make #sudo make install
安裝double-conversion
configure: error: Please install double-conversion library
#sudo mkdir -p /opt/double-conversion #cd /opt/double-conversion #sudo wget https://double-conversion.googlecode.com/files/double-conversion-2.0.1.tar.gz #sudo cmake -DBUILD_SHARED_LIBS=true . #sudo make #sudo make install
安裝folly
configure: error: Please install the folly library
#sudo mkdir -p /opt/folly #cd /opt/folly #sudo wget https://github.com/facebook/folly/archive/master.zip #sudo unzip master.zip #cd /opt/folly/folly-master/folly #sudo autoreconf --install #sudo ./configure #sudo ln -s /usr/local/lib/libgflags.so /lib/libgflags.so #sudo make #sudo make install
安裝fbthrift
configure: error: Unable to find thriftcpp2, you need to install FBThrift: https://github.com/facebook/fbthrift依存於folly喔!
#sudo mkdir -p /opt/fbthrift #cd /opt/fbthrift/ #sudo wget https://github.com/facebook/fbthrift/archive/master.zip #sudo unzip master.zip #cd fbthrift-master/thrift/ #sudo autoreconf --install #sudo ln -s /usr/local/lib/libfolly.so /lib/libfolly.so #sudo ./configure #sudo make #sudo make install
留言
張貼留言