How to Page Template

Topic #1 : Install Checkinstall on a Linux server

Applicable Ephesoft versions:

By default Ephesoft does not install checkinstall. We include the files necessary to install checkinstall so no other packages should have to be installed from a repository or from course.

More Info: If you find an error while installing Ephesoft where it was unable to install ImageMagick or Ghostscript. Check the /var/log/install-ephesoft.log. Scroll up above the Ephesoft ASCII graphics and if you see a mention of the install unable to find checkinstall, you will need to follow the instructions below in order to install checkinstall.

All linux commands will have a # preceding the command. Do not type the # when entering the command

You will want to be root for this since the installation of Ephesoft requires you to be the root user. Installation can only be done as root, but if you are using a non root user for the instructions below, steps 8 and 9 will require you to prefix sudo before the command.

Required packages must be installed prior to using these instructions. I’m including the command to install them for redhat based distributions:

Red Hat: sudo yum install unzip rpmdevtools gcc*

Instructions:

  1. Download the Ephesoft installer zip file (version 4.1.2.0 will be named Ephesoft_4.1.2.0.zip
  2. Unzip the Ephesoft installer to it’s own directory
    1. # unzip Ephesoft_4.1.2.0.zip -d Ephesoft
  3. Change directory to the Ephesoft install directory
    1. # cd Ephesoft
  4. In that directory, you will see a tar.gz file which contains all of the files that will be installed. You will want to extract the checkinstall files from that tar.gz
    1. # tar -xvf ./Ephesoft_4.1.2.0.tar.gz Ephesoft/Dependencies/checkinstall.tar.gz
  5. Change directory to the newly created Dependencies directory
    1. # cd ./Ephesoft/Dependencies
  6. Decompress the checkinstall tar.gz file
    1. # tar xzvf ./checkinstall.tar.gz
  7. Change directory to the newly installed checkinstall directory
    1. # cd checkinstall
  8. Prepare the source code for installation
    1. # make
  9. Compile and install checkinstall
    1. # make install
  10. Verify the installation path of checkinstall, it should be /usr/local/sbin
    1. # which checkinstall
  11. Verify that /usr/local/sbin is in the path for the root user. If you are using sudo to run the make and make install commands, it would be now that you need to change to root user before running this command
    1. # echo $PATH
  12. If the $PATH return does not include /usr/local/sbin, the you will need to add it to the path temporarily. When you change users, this will no longer be in the path, so you must make sure this is done before the install of Ephesoft
    1. # export PATH=$PATH:/usr/local/sbin
  13. Now that you have installed Checkinstall, you will have to tell Ephesoft that it is already installed. You will have to start the installation and it will have an error and close. Once that happens, open the file /etc/Ephesoft/ephesoft.conf and change the value in it for checkinstall from 0 to 1. Save the file and start the installation over.

 

Errors preparing checkinstall for compile and install:

  1. If you receive the following error when running the make command in step 8, then you have not installed gcc first:

Error:

 [root@localhost checkinstall]# make
for file in locale/checkinstall-*.po ; do \
case ${file} in \
locale/checkinstall-template.po) ;; \
*) \
out='echo $file | sed -s 's/po/mo/'' ; \
msgfmt -o ${out} ${file} ; \
if [ $? != 0 ] ; then \
exit 1 ; \
fi ; \
;; \
esac ; \
done
make -C installwatch
make[1]: Entering directory /path/to/folder/checkinstall/installwatch'
./create-localdecls
Checking truncate argument type... off_t
Checking readlinkat result type... ssize_t
Checking libc version... ./create-localdecls: line 47: gcc: command not found
ldd: ./libctest: No such file or directory
rm: cannot remove 'libctest': No such file or directory

gcc -Wall -c -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT -DVERSION=\"0.7.0beta7\" installwatch.c
make[1]: gcc: Command not found
make[1]: *** [installwatch.0] Error 127
make[1]: Leaving directory '/path/to/folder/checkinstall/installwatch'
make: *** [1ll] Error 2

2. If you receive the following error when running the make command, you will have to modify the /checkinstall/installwatch/installwatch.c file at the lines mentioned in the fix below and then start at step 8 again. Note that when you edit the installwatch.c file, there will be an if then statement for a static int on each item listed. You want them to match which is what we are doing here.

Error:

If you then run make, as the INSTALL file tells you to do, you run into compilation errors:
installwatch.c:2942: error: conflicting types for 'readlink'
/usr/include/unistd.h:828: note: previous declaration of 'readlink' was here
installwatch.c:3080: error: conflicting types for 'scandir'
/usr/include/dirent.h:252: note: previous declaration of 'scandir' was here
installwatch.c:3692: error: conflicting types for 'scandir64'
/usr/include/dirent.h:275: note: previous declaration of 'scandir64' was here

Fix:

Make the following changes to the ./checkinstall/installwatch/installwatch.c file:
at line 110, change the static int to match the previous static int:

from:
static int (*true_scandir)( const char *,struct dirent ***,
int (*)(const struct dirent *),
int (*)(const void *,const void *));

to:
static int (*true_scandir)( const char *,struct dirent ***,
int (*)(const struct dirent *),
int (*)(const struct dirent **,const struct dirent **));

 

at line 138, change the static int to match the previous static int:


from:
static int (*true_scandir64)( const char *,struct dirent64 ***,
int (*)(const struct dirent64 *),
int (*)(const void *,const void *));

to:
static int (*true_scandir64)( const char *,struct dirent64 ***,
int (*)(const struct dirent64 *),
int (*)(const struct dirent64 **,const struct dirent64 **));

 

at line 2959, change:

from:
#if (GLIBC_MINOR <= 4)
to:
#if (0)

at line 3103, change the static int to match the previous static int:
from:
int scandir( const char *dir,struct dirent ***namelist,
int (*select)(const struct dirent *),
int (*compar)(const void *,const void *) ) {

to:
int scandir( const char *dir,struct dirent ***namelist,
int (*select)(const struct dirent *),
int (*compar)(const struct dirent **,const struct dirent **) ) {

at line 3719, change the static int to match the previous static int:

from:
int scandir64( const char *dir,struct dirent64 ***namelist,
int (*select)(const struct dirent64 *),
int (*compar)(const void *,const void *) ) {

to:
int scandir64( const char *dir,struct dirent64 ***namelist,
int (*select)(const struct dirent64 *),
int (*compar)(const struct dirent64 **,const struct dirent64 **) ) {

 

|Documentation Main Page |How To Articles | Downloads and Updates |

Was this article helpful to you?

J.D. Abbey

Comments are closed.