Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8231315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:26:45+00:00 2026-06-07T17:26:45+00:00

I am trying to install libsmtp on Ubuntu 12.04, and upon compiling i am

  • 0

I am trying to install libsmtp on Ubuntu 12.04, and upon compiling i am getting errors, here’s the step i followed (they are exactly the same as written in Install.txt file)

cd libsmtp
./configure

[The output of above command is]

checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking for main in -lglib... no
checking for main in -lglib... (cached) no
checking how to run the C preprocessor... gcc -E

The list goes on, but remaining dependencies are installed.
From the output it can be seen that its not able to find ‘lglib’, but its actually installed, the output of modversion is:

usama@ubuntu:~/Desktop/smtp/libsmtp-0.8.5$ pkg-config --modversion glib-2.0
2.32.3

And due to this i got error on running ‘make’, here’s the output:

usama@ubuntu:~/Desktop/smtp/libsmtp-0.8.5$ make
make[1]: Entering directory `/home/usama/Desktop/smtp/libsmtp-0.8.5/smtp'
gcc -I. -I../include `glib-config --cflags` -g -O2 -DUSE_MIME   -c -o    libsmtp_comm.o libsmtp_comm.c
/bin/sh: 1: glib-config: not found
libsmtp_comm.c:28:20: fatal error: glib.h: No such file or directory
compilation terminated.
make[1]: *** [libsmtp_comm.o] Error 1
make[1]: Leaving directory `/home/usama/Desktop/smtp/libsmtp-0.8.5/smtp'
make: *** [all] Error 1

Can anyone please tell how to resolve this issue ?

Updated:

The portion of configure script dealing with glib is :

 echo "$as_me:$LINENO: \$? = $ac_status" >&5
 (exit $ac_status); }; }; then
 ac_cv_lib_glib_main=yes
 else
 echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5

 ac_cv_lib_glib_main=no
 fi
 rm -f conftest.err conftest.$ac_objext \
   conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_glib_main" >&5
echo "${ECHO_T}$ac_cv_lib_glib_main" >&6
if test $ac_cv_lib_glib_main = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBGLIB 1
_ACEOF

LIBS=”-lglib $LIBS”

echo "$as_me:$LINENO: checking for main in -lglib" >&5
echo $ECHO_N "checking for main in -lglib... $ECHO_C" >&6
if test "${ac_cv_lib_glib_main+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
 ac_check_lib_save_LIBS=$LIBS
LIBS="-lglib  $LIBS"
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T17:26:47+00:00Added an answer on June 7, 2026 at 5:26 pm

    Finally i am able to get rid of glib error, here are the steps u need to follow:

    First make sure that libgtk2.0 is installed on your system, if its not installed then u can install it with the following command:

    sudo apt-get install libgtk2.0-dev 
    

    Tell the compiler the path of glib-2.0, the exact command is written below:
    ( Note: The path of libgtk may differ in your system, to check the path use the following command:)

    pkg-config --cflags glib-2.0
    

    U should get an output similar to that:

    -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include 
    

    Now install the libsmtp (or your desired application).

    cd libsmtp
    ./configure
    make CFLAGS='-I/usr/include/glib-2.0' CPPFLAGS='-I/usr/lib/x86_64-linux-gnu/glib-2.0/include'
    

    If you are lucky then u would be able to install your desired application.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to install 1.9.3 using RVM. Getting these errors in my make.log compiling readline.c
I am trying to install postgresql on ubuntu. I followed the steps from http://hocuspokus.net/2008/05/install-postgresql-on-ubuntu-804/
Trying to install PostGIS 2.0.0 on Ubuntu 11.10. I've basically followed the OSGeo instructions
I am trying: install.packages(RGoogleDocs, repos = http://www.omegahat.org/R) As suggested here , but it doesn't
Trying to install pear package and keep getting this strange error. Can you shed
trying to install gdata python library client,receiving following errors: running install running build running
I was trying to install bundler in Linux Mint. but I'm getting this error
I'm trying install pycrypto on osx with easy_install and I'm getting the following error:
Trying to install Cython on a small VPS running Ubuntu Server. Did sudo apt-get
While trying to install Mongodb grails plug in for grails application, i am getting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.