Libpri installation error


would anyone please help
I am trying to install " libpri " on CENTOS4.3 and I get this error message

cd libpri-1.2.2
[root@server01 libpri-1.2.2]# make clean
rm -f *.o *.so *.lo *.so.1 *.so.1.0
rm -f testpri testprilib libpri.a
rm -f pritest pridump
rm -f .depend
[root@server01 libpri-1.2.2]# make
CC=gcc ./mkdep -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g ls *.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -c -o copy_string.o copy_string.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -c -o pri.o pri.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -c -o q921.o q921.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -c -o prisched.o prisched.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -c -o q931.o q931.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -c -o pri_facility.o pri_facility.c
ar rcs libpri.a copy_string.o pri.o q921.o prisched.o q931.o pri_facility.o
ranlib libpri.a
gcc -fPIC -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -o copy_string.lo -c copy_string.c
gcc -fPIC -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -o pri.lo -c pri.c
gcc -fPIC -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -o q921.lo -c q921.c
gcc -fPIC -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -o prisched.lo -c prisched.c
gcc -fPIC -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -o q931.lo -c q931.c
gcc -fPIC -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -o pri_facility.lo -c pri_facility.c
gcc -shared -Wl, -o copy_string.lo pri.lo q921.lo prisched.lo q931.lo pri_facility.lo
/sbin/ldconfig -n .
ln -sf
ln -sf
[root@server01 libpri-1.2.2]# make install
mkdir -p /usr/lib
mkdir -p /usr/include
install -m 644 libpri.h /usr/include
install -m 755 /usr/lib
if [ -x /usr/sbin/sestatus ] && ( /usr/sbin/sestatus | grep “SELinux status:” | grep -q “enabled”); then restorecon -v /usr/lib/; fi
/bin/sh: restorecon: command not found
make: *** [install] Error 127
[root@server01 libpri-1.2.2]#


I’ve had this problem before and it’s pretty easy to fix. Find the file restorecon,

find / -name restorecon

Edit the make file to use the full path to restorecon.


Add the directory which contains restorecon to your system path.

On CentOS ( possibly Fedora as well ) the location of this file is not in the system path of the root user. So when you run make install you get this error.