Find the answer to your Linux question:
Results 1 to 5 of 5
Hello All, I compiled Apache and got the following error after executing make && make install. Can anyone help me fix this. collect2: ld returned 1 exit status make[2]: *** ...
  1. #1
    Just Joined!
    Join Date
    Jun 2009
    Posts
    21

    httpd-2.2.15 error

    Hello All,

    I compiled Apache and got the following error after executing make && make install. Can anyone help me fix this.


    collect2: ld returned 1 exit status
    make[2]: *** [htpasswd] Error 1
    make[2]: Leaving directory `/usr/local/src/httpd-2.2.15/support'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/usr/local/src/httpd-2.2.15/support'
    make: *** [all-recursive] Error 1

    Thanks in advance

    Santhosh

  2. #2
    Just Joined!
    Join Date
    May 2010
    Posts
    10

    Exclamation

    why you don't use YUM to install it...

    #yum -y install http

    if you complie apache by soure, it can miss some library...

    Some my idea

    Good luck

  3. #3
    Linux Enthusiast Mudgen's Avatar
    Join Date
    Feb 2007
    Location
    Virginia
    Posts
    623
    Did you ./configure before make? Any errors from that? What Linux distribution? Are apr and apr-util already installed on the system? What versions?

  4. #4
    Just Joined!
    Join Date
    Jun 2009
    Posts
    21
    I compiled with ./configure, then I gave make && make install and got the above error.
    apr version is 1.2 and Linux distribution is RHEL5.No errors from ./configure.

    Error when I executed make. Its as follows:

    /usr/lib/apr-1/build/libtool --silent --mode=link gcc -pthread -o htpassw d htpasswd.lo -lm /usr/local/src/httpd-2.2.15/srclib/pcre/libpcre.la /usr/lib /libaprutil-1.la -lldap -llber -ldb-4.3 -lexpat /usr/lib/libapr-1.la -lpthread - ldl
    /usr/bin/ld: warning: libpq.so.4, needed by /usr/lib/libaprutil-1.so, not found (try using -rpath or -rpath-link)
    /usr/lib/libaprutil-1.so: undefined reference to `PQgetResult'
    /usr/lib/libaprutil-1.so: undefined reference to `PQsendQueryPrepared'
    /usr/lib/libaprutil-1.so: undefined reference to `PQstatus'
    /usr/lib/libaprutil-1.so: undefined reference to `PQresultStatus'
    /usr/lib/libaprutil-1.so: undefined reference to `PQntuples'
    /usr/lib/libaprutil-1.so: undefined reference to `PQreset'
    /usr/lib/libaprutil-1.so: undefined reference to `PQexec'
    /usr/lib/libaprutil-1.so: undefined reference to `PQconnectdb'
    /usr/lib/libaprutil-1.so: undefined reference to `PQexecPrepared'
    /usr/lib/libaprutil-1.so: undefined reference to `PQescapeString'
    /usr/lib/libaprutil-1.so: undefined reference to `PQexecParams'
    /usr/lib/libaprutil-1.so: undefined reference to `PQfinish'
    /usr/lib/libaprutil-1.so: undefined reference to `PQerrorMessage'
    /usr/lib/libaprutil-1.so: undefined reference to `PQsendQuery'
    /usr/lib/libaprutil-1.so: undefined reference to `PQsendQueryParams'
    /usr/lib/libaprutil-1.so: undefined reference to `PQnfields'
    /usr/lib/libaprutil-1.so: undefined reference to `PQgetvalue'
    /usr/lib/libaprutil-1.so: undefined reference to `PQcmdTuples'
    /usr/lib/libaprutil-1.so: undefined reference to `PQclear'
    collect2: ld returned 1 exit status
    make[2]: *** [htpasswd] Error 1
    make[2]: Leaving directory `/usr/local/src/httpd-2.2.15/support'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/usr/local/src/httpd-2.2.15/support'
    make: *** [all-recursive] Error 1


    Thanks in advance

  5. #5
    Linux Enthusiast Mudgen's Avatar
    Join Date
    Feb 2007
    Location
    Virginia
    Posts
    623
    Always useful to see _all_ the error messages.

    Use "./configure --with-included-apr", or see the 2.2 intstallation doc for discussion of other ways to resolve your apr issues.
    Compiling and Installing - Apache HTTP Server

    I presume you have your reasons for building from source instead of installing from repo, which would take care of issues like this for you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...