Categories
Open Source Ubuntu

Fixing – “Internal error: Segmentation fault”

Recently while compiling some programs I received an unique error message:

c++: Internal error: Segmentation fault (program cc1plus)
Please submit a full bug report.

Even compiling a simple Hello World program gave the same error.

To fix the problem I needed to use a program called debsums on Ubuntu. debsums is a program used to check the MD5 checksums of your installed deb packages. You can install it using the command:

sudo apt-get install debsums

and run it using the command:

debsums | grep -v OK

The above command lists all the packages which have not been installed correctly. If the following line is present in the output:

/usr/lib/gcc/i486-linux-gnu/4.4/cc1plus FAILED

then all you need to do to fix your system is the following command:

sudo apt-get –reinstall install g++-4.4

Now when you compile your code the earlier error shouldn’t appear.

Categories
Web

The Best DNS for you

Having a quick Domain Name Server is very important for that lightning quick internet experience. Fortunately there are ways for you to easily figure out which DNS works best for you.

Namebench as described at its website:

It hunts down the fastest DNS servers available for your computer to use. namebench runs a fair and thorough benchmark using your web browser history, tcpdump output, or standardized datasets in order to provide an individualized recommendation. namebench is completely free and does not modify your system in any way.

All you need to do is download the program and run it. After a few minutes of churning out calculations the program will tell you the best DNS settings for your system.

Reblog this post [with Zemanta]
Categories
Open Source Solutions Ubuntu

Recovering Deleted Data on Linux…

Imagine this situation -  “you are browsing through your photos on your camera or on your your thumb drive.  You decide to clean up the unwanted photos/data and start deleting files.  All of a sudden you realize you deleted your best photo or that important file. How do you get the data back?”

Firstly dont create any new files or copy any new data on the disk.  This will make sure that the data is recoverable (once the sectors where your file used to reside get overwritten its impossible to recover).

Now there are two simple solutions I found for recovery problems.  Both work best in different situations:

GDDRescue

ddrescue is a simple program that copy bit by bit information form one area of the hard disk to another.  It has loads of amazing features but the one that I like the most is that it ignores unreadable sectors and moves on.  This feature is very useful when recovering movies.  It also makes it easy to recover media files if you have the torrent from which you originally downloaded the file.

sudo apt-get install gddrescue

ddrescue -r 3 /media/cdrom/movie.avi /home/user/movie.avi

In the above command
-r 3 :- makes the program to retry to recover data from a bad sector 3 times and then move on.
/media/cdrom/movie.avi :- The input file
/home/user/movie.avi :- The recovered file

Foremost:

Foremost is a simple application that recovers data from a damaged disk. It goes one step better by sorting out the information for the common file types. The output of Foremost is a directory which has a series of subdirectories where files like jpg, avi, mpg, bmp ect are recovered and stored. This is a perfect application to recover specific data from a disk

To install Foremost use the following command:

sudo apt-get install foremost

To run foremost use the following command:

sudo foremost -i /dev/sdb1 -o /recovery/disk

In the above command
-i indicates the partition/file to be recovered from.
-o indicates the output directory where the recovered files will be stored.

Once the recovery is done you will need to change the ownership of the output directory so that you can read the files. Use the following command to do that:

sudo chown -R username /recovery/disk

Ps: There are more complex methods and applications to do data recovery on Linux. These two are the simplest I have used. Feel free to share your suggestions in the comments.

Categories
Ubuntu

Antivirus in Linux…

Off late I have been looking at Antivirus solutions in linux.  Logically it seems like a great idea to me.  Most of the really bad viruses attack the antivirus system directly and cause major damage to the system, having your AV in a opertating system that is much more secure gives you a better guarantee that you can rescue your system.

There are many antivirus solutions for Linux.  I have personally tried ClamAV and Avast.

ClamAV is a command line tool that makes protecting linux systems a simple affair.  The system was orginally made to scan email attachments and does a great job running in the background.  ClamAV is the prefect soulution for someone who wants to install the AV and let it take care of itself.

To Install ClamAv use the following command in Ubuntu

sudo apt-get install clamav

You can a scan of any folder using the following command

clamscan -r -i -l avscan.txt –move=avscan/. /media/disk

The above command scans the folder “/media/drive” recursively and if an infection is found the original location is stored as an enty in the “avscan.txt” file and the infected file is moved to the folder “avscan”.

Avast Antivirus is the more like the traditional Windows Antivirus.  It has a simple UI for updates and scanning of folders and files.  The learning curve is minimal and the antivius is updated very regularly too.

You can download and install Avast from the following location:

http://www.avast.com/eng/avast-for-linux-workstation.html

Reblog this post [with Zemanta]
Categories
Media Solutions Ubuntu

Joining Videos using Mencoder

Mencoder is an extremely powerful video converter that is capable of converting video from almost any format to any other format.  One of the simplest exercises to do with Mencoder involves joining two videos to make a single video.

To join the videos all you need are the videos and Mencoder installed on your system.  You can install Mencoder on your Ubuntu box using the command

sudo apt-get install mencoder

Now lets say you plan to join videos a.mpg and b.mpg to a video c.mpg

Go to the command line (to the folder containing the videos) and execute the command –

mencoder a.mpg b.mpg -ovc copy -oac copy -o c.mpg

Thats it!  You can join more videos with a single shot but remember that the order in which you have listed the videos the final video will be created in the same order.

Reblog this post [with Zemanta]