Original article: http://blog.csdn.net/qyee16/article/details/6848935
1) The first step to install the apr-1.4.5, the order can not be wrong, it must first install
$ Tar zxvf apr-1.4.5.tar.gz
$ CD apr-1.4.
$./Configure -- prefix =/usr/local
$ Make
$ Su Root
$ Make install
2) then install apr-util-1.3.12
$ Tar zxvf apr-util-1.3.12.tar.gz
$ Apr-util-1.3.12 CD
$./Configure -- prefix =/usr/local -- With-Apr =/usr/local/APR
$ Make
$ Su Root
$ Make install
Configure option -- With-Apr =/usr/local/APR specifies the location of the APR Library
3) Finally, you can install log4cxx.
$ Tar zxvf apache-log4cxx-0.10.0.tar.gz
$ Apache-log4cxx-0.10.0 CD
$ Configure -- prefix =/usr/local
$ Make
$ Su Root
$ Make install
4) Add a shared Link Library
Export LD_LIBRARY_PATH =/usr/local/lib
OK. Now log4cxx is installed.
There are some small errors: 3rd rows in part 3rd:./configure -- pefix =/usr/local.
PS: I always report an error when making log4cxx on the official website. It is in the inputstreamreader. cpp file. This should be a bug. a version that can be passed is uploaded to my resources.