Wednesday, December 15, 2010

Easiest way to instal HP printer in Fedora

I wanted to install my HP LaserJet 8150 and HP LaserJet 2430 Network printers in Fedora. I searched in the Internet but found many complected ways to install. After spending some time on the Internet and tried myself, I found the easiest way to install. I am writing the easiest way to install these printers.
1. type in the terminal
It brings one wizard.
2. Go to Edit menu and click on + New Printer
3. Select Internet Printing Protocol (if your printer is network printer, otherwise select LPT#1)
4. Click on Next then select HP and select model name
5. Finally when it ask Device URI, then give hp:/net/HP_LaserJet_8150_Series?ip=your.printer's.IP.Address

replace your.printer's.ip.address with IP Address of your printer.
eg. hp:/net/HP_LaserJet_8150_Series?ip=
or, hp:/net/HP_LaserJet_2430?ip=
6. Print test page.

Saturday, December 11, 2010

vector.tcc:452: error: expected unqualified-id before ‘(’ token

I wasted so much time to solve this problem, while compiling code in c++ in fedora 8.
Now I found out the problem. The problem was due to the not linking c++ in old version of gcc, as I installed older version of gcc.
Oh, god!! finally I found out the problem. I searched 2 days for the solution on the net.

cc: In member function ‘void std::vector<_tp,>::_M_range_insert(__gnu_cxx::__normal_iterator::_Tp_alloc_type::pointer, std::vector<_tp,> >, _ForwardIterator, _ForwardIterator, std::forward_iterator_tag)’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/vector.tcc:452: error: expected unqualified-id before ‘(’ token
make: *** [diffusion3/ns/difftimer.o] Error 1
Ns make failed!

Thursday, December 9, 2010

Error while loading shared libraries: cannot open shared object file: No such file or directory

This error comes while installing some applications in Fedora.
It comes because is installed in other library folders, rather than /usr/lib. If you make symbolic link to /usr/lib from the folder where is installed. It's solved.


ln -s /opt/gcc33/lib/ /usr/lib/

Remember that in my computer /opt/gcc33 is the folder where I have installed new gcc. It can be different in your computer. Just search the

Wednesday, December 8, 2010

MSN messenger for Ubuntu and Fedora

MSN messenger or Windows Messenger or Live Messenger's alternative for Ubuntu and Fedora is AMSN messenger. It's available in the following link. Download it and give these two lines command in the terminal.
Download link:
sudo apt-get -f -y install amsn
sudo dpkg -i amsn_0.95-3.ubuntu.deb

Easiest way to install in Fedora
Click on Applications >> Add/Remove Software
Click on Search tab, and search AMSN
Click the checkbox/s for AMSN
Click apply
Alternatively, you can do
$yum install amsn

Monday, December 6, 2010

How to install gcc-3.3 in Ubuntu 9.04

Today I tried to install gcc-3.3 in Ubuntu9.04 in my PC. I followed following steps. I found 2 patches to solve the errors in the Internet.
(NOTE: - means delete, and + means add as in Patch file)

1. Download gcc-core3.3.tar.bz2 and gcc-g++-3.3.tar.bz2
2. bzip2 -cd gcc-core3.3.tar.bz2 | tar xvf -
bzip2 -cd gcc-g++-3.3.tar.bz2 | tar xvf -
3. mkdir build
4. cd build
5. /home/xxxx/gcc/gcc-3.3/configure --prefix=/opt/gcc33 --program-suffix=33 --enable-languages=c,c++

6. If there are errors from /usr/include/bits/studio-lock.h file
then comment the /*#include */
- #include
+ /*#include */
7. If there are errors from gcc/gcc-3.3/include/obstack.h file ("/read-rtl.c:653: error: lvalue required as increment operand")
Change line#423 in
- *((void **)__o->next_free)++ = ((void *)datum); \
+ *((void **)__o->next_free) = ((void *)datum);
+ __o->next_free += sizeof(void *); \
8. If there are errors from decl.c file
Apply gcc42-patch-gcc-3.3.1_gcc_cp_decl.c patch from
9. If there is an error "gcc/collect2.c:1779:/usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’ declared"
Then, in the line number 1776 of gcc/collect2.c
- redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT);
+ redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT, 0666);
10. make
11. Follow

Few useful commands
sudo apt-get install gcc
find /usr/bin |grep gcc
find /usr/bin |grep g++
stat /usr/bin/gcc

$ cd /usr/bin
The default gcc version
$ gcc --v

Delete the old symbolic links
$ sudo rm cpp gcc g++

Change the symbolic links to 3.3: (Find where the gcc33 is installed. In this example we installed in /opt/gcc33/bin (we gave the command while installing gcc as: --prefix=/opt/gcc33).

$sudo ln -s /opt/gcc33/bin/g++33 /usr/bin/g++
$sudo ln -s /opt/gcc33/bin/gcc33 /usr/bin/gcc
$sudo ln -s /opt/gcc33/bin/cpp33 /usr/bin/cpp

Check the default gcc version

$ gcc --v

It should show new gcc version.