Categories

Wednesday 26 June 2013

how to fix the error "ERROR:root:code for hash sha512 was not found." when running a python script

Hi,

 IF you got the error "ERROR:root:code for hash sha512 was not found." on running any python script then it might be due to a package called hashlib for python is missing . Here is the steps to install the package .

Download the package hashlib-20081119.tar.gz  from http://code.krypto.org/python/hashlib/

Then do the following steps

tar xvfz hashlib-20081119.tar.gz
cd hashlib-20081119
sudo python setup.py install

It will install the package.

Then run the script again .

Regards
Syamkumar

Tuesday 25 June 2013

How to install Ruby on rails application on Ubuntu machine.


Hi All,

Below is the step by step installation procedure for ruby on rails on ubuntu 11.10 machine.

The packages needed for the installation of Ruby on rails on

    Ubuntu 11.10
    Ruby 1.92
    Rails 3.20
    Rubygems 1.8.15
    MySQL
    SQLite
    Git


1) First upgrade and update your system packages using the commands

"sudo apt-get upgrade
sudo apt-get update"

2)Install Ruby 1.9.2 , build-essential and git.

 Ubuntu provides several versions of Ruby. If you aren’t careful, you may end up installing older or even multiple versions. We want to install version 1.9.2 so we have the latest and greatest. For this, and other tasks ahead of us, we’ll also need build-essential as it has the developer tools that will be needed to compile various gems. Git is optional,

sudo apt-get install ruby1.9.2-full build-essential git-core

3)Install RubyGems 1.8.15

wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.15.tgz
tar -zxvf rubygems-1.8.15.tgz
cd rubygems-1.8.15
sudo ruby setup.rb

4)Update gems

sudo gem update --system
sudo gem install rubygems-update
sudo update_rubygem


5)Install the remaining some packages using the below commands


As rubygems  is installed we have to install rails on the machine now



sudo gem install rails
sudo apt-get install libsqlite3-dev
sudo gem install sqlite3
sudo apt-get install nodejs
sudo apt-get install mysql-server mysql-client
sudo apt-get install libmysql-ruby libmysqlclient-dev
sudo gem install mysql


6)Test the application

You should now have a working Ruby on Rails environment

to test it out


cd ~/
rails new app_of_the_century
cd app_of_the_century
rails generate model User


If you installation worked, Rails should create your application file/folder structure and generate a User model all without a single error.




Reference :http://www.brandedclever.com/the-perfect-rails-install-on-ubuntu-11-10/




Monday 24 June 2013

How to install R application on ubuntu machine to install and run Bioconductor on ubuntu machine

Hi,

The current release of Bioconductor is version 2.12; it works with R version 3.0.1.

So we have to install or upgrade the R on the machine.

1) So first download the latest R package using the command.

wget https://launchpadlibrarian.net/140308028/r-base_3.0.1.orig.tar.gz

2) Extract it to the machine using the command  tar -xvzf r-base_3.0.1.orig.tar.gz


3)cd R-3.0.1/

change into the extracted directory and then run the following commands.


 ./configure

 make

 make install

 This will install the R on the machine

You can check the version by issuing the command

R --version

4)Now we have to install Bioconductor.

So just get into the R console using the command

R

and then run the following commands in it.

source("http://bioconductor.org/biocLite.R")
biocLite()

This will automatically install the required package for Bio conductor on the ubuntu machine.


Reference:http://bioconductor.org/install/


Regards
Syamkumar























E: Could not perform immediate configuration on 'util-linux' error on running apt-get update on ubuntu machine.

Hi,

 If you got the error as "E: Could not perform immediate configuration on 'util-linux': on ubuntu machine while running the command apt-get upgrade or apt-get update,

then do the following .


apt-get install util-linux -f -o APT::Immediate-Configure=0

This will fix the error on upgrading .


Friday 21 June 2013

How to create a shared VNC connection using xinetd

Hi all,

In this tutorial, we are going to create vnc connections which can be accessed by any users and which can be resumed at any point of time.

Also we can create vnc for individual users as well..


 1) Install the required packages

# yum install vnc-server xinetd

2) Enable the XDMCP by editing the custom.conf file

# vi /etc/gdm/custom.conf

[xdmcp]
Enable=true
MaxSessions=30

[security]
AllowRemoteRoot=true
DisallowTCP=false

Note: Here “AllowRemoteRoot=true” used to allow root access.

3) Create a file with below content, in inside the /etc/xinetd.d directory

# vi /etc/xinetd.d/xvncserver

service vnc
{
  type = UNLISTED
 disable = no
 socket_type = stream
 protocol = tcp
 wait = yes
 user = test1
 server = /usr/bin/Xvnc
 server_args = -inetd -query localhost  -geometry 1280x800 -depth 16 passwordfile=/etc/vncpasswd/Xvnc.pass2
 log_type = FILE /var/log/xinetdlog
 log_on_failure += USERID
 port = 5950
 }



5)Now create a vnc password using the commands below.

mkdir /etc/vncpasswd/
vncpasswd /etc/vncpasswd/Xvnc.pass2
Then type the password you want to connect to vnc. It will be stored in that file.

6) Define the vnc01 service by edit the /etc/services file

# vi /etc/services

vnc   5950/tcp
7) Restart the xinetd and gdm services

# service xinetd restart
# gdm-restart
8) Test using the vncviwer command

# vncviewer localhost:5950
9) To connect from the remote system use the below one

# vncviewer IPADDRESS:5950

How to run multiple versions of java in Ubuntu linux

Hi,

 First install the two version of java by issuing the commands.

apt-get install openjdk-6-jre
apt-get install openjdk-7-jre

It will install the two version of java but the last installed version can be used by default on the system.


The installation path will be

/usr/lib/jvm/java-7-openjdk-i386
/usr/lib/jvm/java-6-openjdk-i386

By default the java bin path /usr/bin/java is linked to the file /etc/alternatives/java which is linked to /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java(if it is installed first). Other wise the link will be to /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java

To use a different version of java on the same ubuntu machine, we need to export the java home path using the command

export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386/

If you need to make it permenant you need to add this in the .bashrc file.


Other wise there is another command which will help to change the java version.

which is

update-alternatives --config java
which will list the installed java versions

update-alternatives --config java
There are 3 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                           Priority   Status ------------------------------------------------------------
  0            /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java   1061      auto mode
  1            /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java   1061      manual mode
* 2            /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java   1051      manual mode
  3            /usr/lib/jvm/java-7-oracle/jre/bin/java         1         manual mode

If you want to use java version 1.6 choose the first one and enter it will change the binary path of the java to the new one.

Regards
Syamkumar
















Ad