How to resolve : undefined reference to `pcap_lookupdev’

If you are trying to compile any network packet capturing related program, there are higher chances you may see an errors like, undefined reference to `pcap_lookupdev’ undefined reference to `pcap_open_live’ undefined reference to `pcap_loop’ undefined reference to `pcap_geterr’ collect2: error: ld returned 1 exit status This error is because, you either doesn’t have libpcap installed … Read more

How to solve : undefined reference to `MD5_Init’

If you are compiling a c propgram which calculates MD5 using a c program, there are higher chances you will encounter an errors like below, /tmp/cc1eHvha.o: In function `calculate_file_md5′: md5-calculate.c:(.text+0x7b): undefined reference to `MD5_Init’ md5-calculate.c:(.text+0x9d): undefined reference to `MD5_Update’ md5-calculate.c:(.text+0xe1): undefined reference to `MD5_Final’ collect2: error: ld returned 1 exit status The MD5 functionality is … Read more

Debugging using C macros __FILE__ and __func__ and __LINE__

Following program shows a sample example of how we can use C macros __FILE__ , __func__ and __LINE__ to print the debug information which will show us, where is execution reached to, if any error it can print the line number of error and if in case of multi file programs like library, it can … Read more

Printing error conditions in C programs using errno, perror and strerror

The perror() function produces a message on standard error describing the last error encountered during a call to a system or library function.When a system call fails, it usually returns -1 and sets the variable errno to a value describing what went wrong. (These values can be found in .) Many library functions do likewise. … Read more

How to resolve: error: initializer element is not constant

Sometimes during complex programing, there are chances we make some mistakes during hurry to write and complete the program so that we can test the features, in somewhat similar occasion, we faced an error during compilation as, “error: initializer element is not constant” , now as mentioned, if we have written multiple lines during coding … Read more

How to resolve : “Undefined variable: crumb” error with openclassifieds

Recently on our website which uses openclassifieds scripts for classifieds, we started getting following errors, Undefined variable: crumb When we looked at other error logs, we see following errors along with the above primarily visible error in browser, 2018-01-31 10:00:26 — ERROR: ErrorException [ 8 ]: Undefined variable: content ~ APPPATH/common/views/alert_terms.php [ 9 ] in … Read more

How to compile dts to dtb from Linux kernel and manually

Lets say, you have been trying to compile Linux kernel source code for Raspberry Pi following steps from “Cross Compilation and Booting of Linux kernel for Raspberry Pi3 – Manual Compilation” although most of the steps remains same in general for other ARM architectures as well , so just replace Raspberry Pi name with your … Read more

How to check some binary belongs to which package in Ubuntu

If you want to identify some binary belongs to which package in ubuntu in certain situations when you want to port that binary to some other platform but don’t know which package this binary belongs to, type below command on ubuntu terminal, Lets say, you want to know which package the “top” command belongs to, … Read more

How to Install Teamviewer on Ubuntu 16.04 and Later ?

To install Teamviewr, Download appropriate .deb file from For 64 bit Ubuntu, download as, $ wget -c $ sudo dpkg -i teamviewer_amd64.deb $ sudo apt-get -f install $ sudo dpkg -i teamviewer_amd64.deb $ teamviewer In our case we are using 32 bit Ubutu, we downloaded, teamviewer_14.3.4730_i386.deb which is current (when we installed) recent … Read more