Tuesday, April 15, 2014

Install nodejs or node.js on ubuntu

To install node.js ( nodejs ) on ubuntu, Run following commands.

# sudo add-apt-repository ppa:chris-lea/node.js

# sudo apt-get update

# sudo apt-get install nodejs

# sudo apt-get install software-properties-common

Install Packages using npm on Ubuntu
First install npm on ubuntu
# sudo apt-get install npm
Now install packages using npm
Install mongodb :
# npm install mongodb
Install express :
# npm install express

XAMPP - Fatal error: Class 'ZipArchive' not found

Run following command to download file zip.so
# /opt/lampp/bin/pecl install zip
It will install zip functionality, now enable the extension zip.so

To Enable this, uncomment following line (remove the semi colon (;) )
extension="zip.so"
in the file /opt/lampp/etc/php.ini

Restart xampp.

phantomjs: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory

CentOS - If you are getting this error while executing phantomjs on terminal

phantomjs: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory
 
To remove this error.

# sudo yum install fontconfig
If you are still facing the error, Run
# sudo yum install fontconfig freetype libfreetype.so.6 libfontconfig.so.1 libstdc++.so.6
Note :
If you are using ubuntu or debian, use apt-get install to install this package.