ImageGear for C and C++ on Linux v21.0 - Updated
User Guide / Getting Started / Installation
In This Topic
    Installation
    In This Topic

    To install ImageGear, download an electronic version from www.accusoft.com. Please contact Accusoft Support for instructions on downloading your specific version of ImageGear for Linux.

    The name of the ImageGear installation package for Linux is as follows:

    Please see Automated Installation Script or Manual Installation sections below for details on installing ImageGear.

    Automated Installation Script

    1. Move the installation file ImageGear_for_C_CppXX.XX.X-Linux64.tar.gz into your home directory $HOME.
    2. Extract the installation file contents, which is typically done by running:
      tar zxvf {installation filename}
          
      
    3. In the $HOME/Accusoft/ImageGearXX-64/ after extracting, locate the install.sh script and run it. Below is the example for Linux (bash):
      . install.sh
          source install.sh
          
      
      The script will search for and modify the current user's shell profile files to add ImageGear's environment variables for the current folder and attempt to run the Accusoft License Manager. Optionally, a destination directory can be used as an argument. For example:
      . install.sh $HOME/ImageGearXX-64
          source install.sh $HOME/ImageGearXX-64
          
      
      In this case, the contents of the $HOME/Accusoft/ImageGearXX-64/ directory will be copied to the specified directory, and the environment variables and licensing will be done for this location.
    4. To opt-out of data collection, define environment variable IG_PRO_OPT_OUT. Here is an example .bash_profile with additional variable defined:
      # Define variable to opt out for IG pro analytics
          IG_PRO_OPT_OUT=YES
          export IG_PRO_OPT_OUT
          
      

    Manual Installation

    1. Move the installation file ImageGear_for_C_CppXX.XX.X-Linux64.tar.gz into your home directory $HOME
    2. Extract the installation file contents, which is typically done by running:
      tar zxvf {installation filename}
      
    3. In order for ImageGear to work, there must be a license file installed. The license key is kept in the file with the name accusoft.<solution name>.<version specification>.license. For Linux 64-bit platforms, ImageGear installation uses the predefined solution name "Accusoft" and version specification "1-106-XX", where "XX" is the major version number.

      Please use $HOME/Accusoft/ImageGearXX-64/licensing/licensemanager/runLicenseManager script to run the License Manager user interface. Please refer to ImageGear Licensing for additional details about how to acquire a license key. 4. Now that the license file is created, the variable ACCUSOFT_LICENSE_DIR has to be defined and should contain the path to the license file (for example: $HOME/.config/accusoft/licensing/). If the ACCUSOFT_LICENSE_DIR variable is not defined, ImageGear will look for the license file successively in the following locations: * current working directory * $HOME/.config/accusoft/licensing * /etc/accusoft/licensing * /usr/lib 5. In order to let the linker find ImageGear shared libraries, you need to define LD_LIBRARY_PATH environment variable. For example:

      LD_LIBRARY_PATH=$HOME/Accusoft/ImageGearXX-64/bin
      
      6. ImageGear uses IMAGE_GEAR_LIBRARY_PATH variable to set a path to the ImageGear libraries. For example:
      IMAGE_GEAR_LIBRARY_PATH=$HOME/Accusoft/ImageGearXX-64/bin
      
      7. ImageGear also uses SSMPATH variable to set a path to the DCRAW library. It should point to the same location as IMAGE_GEAR_LIBRARY_PATH. For example:
      SSMPATH=$HOME/Accusoft/ImageGearXX-64/bin
      
      8. Here is an example Linux .bash_profile with all the necessary variables defined:
      # User specific environment and startup programs
      PATH=$PATH:$HOME/bin:.
      BASH_ENV=$HOME/.bashrc
      USERNAME=""
      LD_LIBRARY_PATH=$HOME/Accusoft/ImageGearXX-64/bin
      IMAGE_GEAR_LIBRARY_PATH=$HOME/Accusoft/ImageGearXX-64/bin
      SSMPATH=$HOME/Accusoft/ImageGearXX-64/bin
      ACCUSOFT_LICENSE_DIR=$HOME/.config/accusoft/licensing/
      export USERNAME BASH_ENV PATH LD_LIBRARY_PATH IMAGE_GEAR_LIBRARY_PATH ACCUSOFT_LICENSE_DIR SSMPATH
      
      9. To opt-out of data collection, define environment variable IG_PRO_OPT_OUT. Here is an example .bash_profile with additional variable defined:
      # Define variable to opt out for IG pro analytics
      IG_PRO_OPT_OUT=YES
      export IG_PRO_OPT_OUT
      

    Installing the PDF Component

    The following environment variables must specify a path to the PDF component resource files:

    IMAGE_GEAR_PDF_RESOURCE_PATH=$HOME/Accusoft/ImageGearXX-64/Resource/PDF/
    IMAGE_GEAR_PS_RESOURCE_PATH=$HOME/Accusoft/ImageGearXX-64/Resource/PS/
    IMAGE_GEAR_HOST_FONT_PATH=$HOME/Accusoft/ImageGearXX-64/Resource/PS/Fonts/
    

    See the PDF Component API Function Reference for more ImageGear PDF initialization details.

    NOTE: The PostScript Normalizer library of the ImageGear for C and C++ 32-bit PDF component does use text relocations, which is restricted under SELinux (RHEL, CentOS, and some other distributions), and may result in failure to load the PDF component. This can be countered by permitting text relocations specifically to Normalizer, without disabling SELinux in general:

    /usr/sbin/semanage fcontext -a -t textrel_shlib_t '/home/user/Accusoft/ImageGearXX-64/bin/libDL100nserver.so'
    /sbin/restorecon -v /home/user/Accusoft/ImageGearXX-64/bin/libDL100nserver.so
    

    where /home/user/Accusoft/ImageGearXX-64 is the actual path to your ImageGear for C and C++ installation.

    Uninstalling ImageGear

    To uninstall the ImageGear Linux library, simply delete all the ImageGear files. You may issue the following command, if the files were installed in the default directory:

    rm -rf Accusoft
    

    If the automated install script was used, or if you manually added the IMAGE_GEAR_* environment variables to your shell profile, you can remove them now.