(转)log4cxx安装错误

转自一下博客:http://techiech.blogspot.com/2010/11/apache-log4cxx-installing-error-on.html

The compilation went fine. But the installation failed with the following error

make[5]: Entering directory `/home/lab409/log4cxx/src/main/include/log4cxx/private'
make[6]: Entering directory `/home/lab409/log4cxx/src/main/include/log4cxx/private'
make[6]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/include/log4cxx/private" || /bin/mkdir -p "/usr/local/include/log4cxx/private"
/bin/install -c -m 644 http://www.cnblogs.com/http://www.cnblogs.com/../src/main/include/log4cxx/private/log4cxx_private.h log4cxx_private.h '/usr/local/include/log4cxx/private'
/bin/install: will not overwrite just-created `/usr/local/include/log4cxx/private/log4cxx_private.h' with `log4cxx_private.h'
make[6]: *** [install-privateincHEADERS] Error 1
make[6]: Leaving directory `/home/lab409/log4cxx/src/main/include/log4cxx/private'
make[5]: *** [install-am] Error 2
make[5]: Leaving directory `/home/lab409/log4cxx/src/main/include/log4cxx/private'
make[4]: *** [install-recursive] Error 1
make[4]: Leaving directory `/home/lab409/log4cxx/src/main/include/log4cxx'
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory `/home/lab409/log4cxx/src/main/include'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/lab409/log4cxx/src/main'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/lab409/log4cxx/src'
make: *** [install-recursive] Error 1

The error happened when trying to overwrite the same file which is just created at the destination directory.
To fixed the error, follow these

  1. Get a fresh copy of log4cxx from the svn repository.
  2. Change the followings:

In src/main/include/log4cxx/private/Makefile.am,

  • "privateinc_HEADERS= $(top_builddir)/src/main/include/log4cxx/private/*.h log4cxx_private.h" to "privateinc_HEADERS= $(top_builddir)/src/main/include/log4cxx/private/*.h"

In src/main/include/log4cxx/Makefile.am

  • "log4cxxinc_HEADERS= $(top_srcdir)/src/main/include/log4cxx/*.h log4cxx.h" to "log4cxxinc_HEADERS= $(top_srcdir)/src/main/include/log4cxx/*.h"

3. Now rebuild the source as mention here.

posted @ 2012-01-13 16:29  sunhaohui  Views(698)  Comments(0)    收藏  举报