Search This Blog

Thursday, June 17, 2021

How to free RAM Memory

STEP1:
    i) sudo sync
  ii)sudo sysctl -w vm.drop_caches=3
  iii) sudo sync

STEP2:
  i) echo 1 > /proc/sys/vm/drop_caches
  ii) echo 2 > /proc/sys/vm/drop_caches
  iii) echo 3 > /proc/sys/vm/drop_caches

Friday, June 10, 2016

perl: warning: Please check that your locale settings


Problem: perl: warning: Please check that your locale settings:     LANGUAGE = (unset),     LC_ALL = (unset),     LC_TIME = "en_IN.UTF-8",     LC_MONETARY = "en_IN.UTF-8",     LC_ADDRESS = "en_IN.UTF-8",     LC_TELEPHONE = "en_IN.UTF-8",     LC_NAME = "en_IN.UTF-8",     LC_MEASUREMENT = "en_IN.UTF-8",     LC_IDENTIFICATION = "en_IN.UTF-8",     LC_NUMERIC = "en_IN.UTF-8",     LC_PAPER = "en_IN.UTF-8",     LANG = "en_US.UTF-8"     are supported and installed on your system.


Solution:

$ locale  locale: Cannot set LC_ALL to default locale: No such file or directory  LANG=en_US.UTF-8  LANGUAGE=  LC_CTYPE=en_US.UTF-8  LC_NUMERIC=ru_RU.UTF-8  LC_TIME=ru_RU.UTF-8  LC_COLLATE="en_US.UTF-8"  LC_MONETARY=ru_RU.UTF-8  LC_MESSAGES="en_US.UTF-8"  LC_PAPER=ru_RU.UTF-8  LC_NAME=ru_RU.UTF-8  LC_ADDRESS=ru_RU.UTF-8  LC_TELEPHONE=ru_RU.UTF-8  LC_MEASUREMENT=ru_RU.UTF-8  LC_IDENTIFICATION=ru_RU.UTF-8  LC_ALL=    $ sudo su    # export LANGUAGE=en_US.UTF-8  # export LANG=en_US.UTF-8  # export LC_ALL=en_US.UTF-8    # locale-gen en_US.UTF-8  Generating locales...    en_US.UTF-8... up-to-date  Generation complete.    # dpkg-reconfigure locales  Generating locales...    en_AG.UTF-8... done    en_AU.UTF-8... done    en_BW.UTF-8... done    en_CA.UTF-8... done    en_DK.UTF-8... done    en_GB.UTF-8... done    en_HK.UTF-8... done    en_IE.UTF-8... done    en_IN.UTF-8... done    en_NG.UTF-8... done    en_NZ.UTF-8... done    en_PH.UTF-8... done    en_SG.UTF-8... done    en_US.UTF-8... up-to-date    en_ZA.UTF-8... done    en_ZM.UTF-8... done    en_ZW.UTF-8... done  Generation complete.    # exit    $ locale  LANG=en_US.UTF-8  LANGUAGE=en_US.UTF-8  LC_CTYPE="en_US.UTF-8"  LC_NUMERIC="en_US.UTF-8"  LC_TIME="en_US.UTF-8"  LC_COLLATE="en_US.UTF-8"  LC_MONETARY="en_US.UTF-8"  LC_MESSAGES="en_US.UTF-8"  LC_PAPER="en_US.UTF-8"  LC_NAME="en_US.UTF-8"  LC_ADDRESS="en_US.UTF-8"  LC_TELEPHONE="en_US.UTF-8"  LC_MEASUREMENT="en_US.UTF-8"  LC_IDENTIFICATION="en_US.UTF-8"  LC_ALL=en_US.UTF-8

Wednesday, December 30, 2015

How to install flash player in Ubuntu

sudo apt-get update    sudo apt-get purge adobe-flash{plugin,-properties-gtk}    sudo apt-get install flashplugin-installer


Thursday, December 24, 2015

grub rescue

if get error as follows at the of boot:

No Such partition..
grub rescue>

or unknown file system
grub rescue>

follow the following steps:

1. run ls command
2. you will get list of partitions
3. apply ls comman on each
4. ls (hd0)
 you will get 'not found' or unknown file system message

apply ls on next partition eg
ls (hd0,msdos8)
again  you will get 'not found' or unknown file system message

apply ls on next partition eg
ls (hd0,msdos7)
now suppose here you gets some list of files and folder. THis indicates that your ubuntu/linux is installed here

now apply ls (hd0.msdos7)/boot/grub

you should get list of mod files

5. Now use following commands
set root=(hd0,msdos7)
set prefix=(hd0,msdos7)/boot/grub
insmod normal
normal

Your system to start...

6. Once you started the system in Linux
   Re-install the grub

    sudo grub-install /dev/sda

do not put partition number like sda1 or sda2

Update the grub:
 sudo update-grub

Friday, May 29, 2015

how to remove crossplatformui

  1. Enter /var/lib/dpkg/info

    cd /var/lib/dpkg/info  
  2. Delete all entry related to crossplatformui

    sudo rm crossplatformui.*  
  3. Force remove crossplatformui

    sudo dpkg --remove --force-remove-reinstreq crossplatformui    (Reading database ...   dpkg: warning: files list file for package `crossplatformui' missing, assuming package has no files currently installed.    (Reading database ... 159448 files and directories currently installed.)    Removing crossplatformui ... 

Source: http://askubuntu.com/questions/136423/crossplatformui-error

Wednesday, December 3, 2014

Can't locate Audio/Wav.pm

Error: Can't locate Audio/Wav.pm

Solution: install the missing Audio::Wav dependency module by following command:
sudo cpan Audio::Wav



Wednesday, November 26, 2014

Resampling audio data

Method1:
Using ch_wav  command


Example: Converting 16 Khz wave file into 8 Khz

ch_wave   -f    16000   -F    8000 -o   wav_8KHz/text001.wav     ../wav_16KHz/text001.wav

Method2:
Using sox command
sox input.wav -r 44000 output.wav resample

Here 44000 is the sampling rate of output file


Example: Converting 16 Khz wave file into 8 Khz

sox   text0001.wav   -r    8000   wav_8KHz/text001.wav   resample


Resampling all files of a directory

write following code in a file suppose down_sample.pl
chomp(@ARGV = <STDIN>) unless @ARGV;
for ( @ARGV )
{
  $was = $_;
  print "was=$was";
  #print "op =$op";

   
 
 $now="./output/".$was;
print "now1=$now\n";
   # @args= ( "ch_wave", "-f", "48000", "-F", "16000", "-o", "$now", "$was");
 @args= ( "sox", "$was", "-r", "16000", "$now", "resample" );
  
                            system(@args);


}


Suppose you are having 48 Khz wav files i directory wav_48khz:
1. Copy the down_sample.pl file having above code into wav_48khz directory
2. Create directory output inside wav_48khz directory
3. Open terminal and go to the wav_48khz directory
4. run following command
    perl down_sample.pl *.wav
5. 16 Khz wav files will be inside output directory
7. You may use either sox or ch_wav command. Some times ch_wav command does not recognise wave files then we should use sox.

Monday, October 20, 2014

How to Install the latest version of Adobe Flash Player in Linux


1. Open a terminal window (press Ctrl + Alt + T) and run the following command:
     
sudo apt-get install flashplugin-installer 

2.
When the Flash Player is installed, close the terminal window and restart your browser.

Monday, July 28, 2014

How to upgrade google chrome on linux

 To selectively upgrade Google Chrome, run this command from the terminal:

    sudo apt-get upgrade google-chrome-unstable


Monday, June 9, 2014

How to free caches in ubuntu


How to free caches in ubuntu
sudo sync && sudo sysctl -w vm.drop_caches=3

Monday, March 24, 2014

Unable to run a 32-bit program on 64-bit machine

Qs. I compiled a small "hello world" C program on Ubuntu 10.04 32 bit machine. Then I put the executable(a.out) on Ubuntu 12.10(64 bit) VMWare virtual machine and tried to execute it(./a.out). The OS does not identify the file and says 'No such file or directory'. But when I put the same executable on a Ubuntu 12.10(64 bit) running on a 64 bit laptop, it runs fine and I get the desired output. The VM is running on IBM Blade Servers. I wanted to know why the results for a VM?

Ans:
The message No such file or directory does not refer to your executable file: a.out. Instead it refers to a helper program that's needed to run the 32 bit dynamically linked executable a.out.

Source: http://askubuntu.com/questions/351827/unable-to-run-a-32-bit-program-on-64-bit-vm

Tuesday, March 4, 2014

PHP is running with user ID=33, but this directory is owned by the system user with ID=0

Error:PHP is running with user ID=33, but this directory is owned by the system user with ID=0

Solution:
 sudo chown -R  www-data:www-data  /var/www/X2Engine/

before changes it was
drwxrwxrwx 3 root root    4096 Mar  4 16:24 X2Engine



--
Pranaw Kumar
C-DAC MUMBAI
Ph-(+91) (22) 26201606

Monday, February 24, 2014

Thursday, January 30, 2014

Sunday, December 29, 2013

Not able to login via GUI : Error in locking Xauthority file

1. Switch to command line "Ctrl" + "Alt" + "F6″

2. enter login, provide user name and password
3. type startx
   it should switch to GUI mode
but if you get Error in locking Xauthority file, try following:

The error i got means i do not have authorize to access $HOME/.Xauthority file in my user directory.

If you have the same problem, simply run chown as root to change the ownership back to the user. At the terminal as root, go to /home/user
# cd /home/user

list all files with ownership
# ls -a -lh

change file/files ownership to your user
# chown user:user .Xau*

reboot the machine, everything should be working as normal now.

Source: http://namhuy.net/1077/fixing-error-in-locking-authority-file-xauthority.html


Wednesday, December 18, 2013

Grub Re-installation


You need to have Ubuntu Live CD or Live USB. Normal session can be used to repair the grub. Boot using your Ubuntu Live CD or Live USB, while booting choose Try Ubuntu.

Once booted then open a terminal, and run the following command one by one to install the boot repair.

To add boot-repair to the repository

sudo add-apt-repository ppa:yannubuntu/boot-repair

To Update your repository

    sudo apt-get update

To install boot-repair

sudo apt-get install -y boot-repair

Once Installation complete run boot-repair on terminal by typing the following command or select it by System->Aministration->Boot Repair.

boot-repair

NOTE: Update the Boot Repair if its newer version is available.


Source: http://www.howopensource.com/2012/05/reinstall-recover-grub-from-ubuntu-12-04-live-cd-usb/


Wednesday, July 17, 2013

Host key verification failed...




Problem:    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!   

IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
96:f3:6d:5b:73:38:f0:31:3e:3f:11:91:a9:f8:ba:b4.
Please contact your system administrator.
Add correct host key in /home/boss/.ssh/known_hosts to get rid of this message.
Offending key in /home/boss/.ssh/known_hosts:6
RSA host key for 202.141.151.19 has changed and you have requested strict checking.
Host key verification failed.

Solution:

Open ~/.ssh/known_hosts and delete all lines, after just reconnect and you will get a new key.

eg. pico ~/.ssh/known_hosts and delete all lines


Wednesday, June 26, 2013