If your Linux distribution has Security-enhanced Linux (SELinux) turned on, you may get error "cannot restore segment prot after reloc: Permission denied" when using an Easysoft ODBC driver. This error occurs because the Easysoft ODBC driver libraries require text relocation, but the SELinux policy on your machine prevents this. To work around this, change the SELinux policy to allow the use of libraries that require text relocation. To do this, as root, run:
chcon -t texrel_shlib_t
This example output illustrates the error and the workaround:
# isql -v mydsn [01000][unixODBC][Driver Manager]Can't open lib '/usr/local/easysoft/sqlserver/lib/libessqlsrv.so' : /usr/local/easysoft/sqlserver/lib/libessqlsrv.so: cannot restore segment prot after reloc: Permission denied [ISQL]ERROR: Could not SQLConnect # dltest /usr/local/easysoft/sqlserver/lib/libessqlsrv.so [dltest] ERROR dlopen: /usr/local/easysoft/sqlserver/lib/libessqlsrv.so: cannot restore segment prot after reloc: Permission denied # chcon -t texrel_shlib_t /usr/local/easysoft/sqlserver/lib/libessqlsrv.so # dltest /usr/local/easysoft/sqlserver/lib/libessqlsrv.so SUCCESS: Loaded /usr/local/easysoft/sqlserver/lib/libessqlsrv.so