ERROR 1: libNCSEcw.so: cannot open shared object file: No such file or directory - command-line

I am trying to convert some ECW files to GeoTiff with Gdal command lines in Ubuntu 12.04 but ECW was not supported. I followed some instruction for installing the ecw libraries (http://lists.osgeo.org/pipermail/ubuntu/2014-May/001090.html) by downloading ECWJP2SDKSetup_5.1.1.bin and everything went smooth up to the point of testing if the extension is working with gdalinfo --formats | grep -i ecw. It looks like the installation. I get the following error message:
"ERROR 1: libNCSEcw.so: cannot open shared object file: No such file or directory"
I am using gdal v1.10.0. I should also say that when unpacking ECWJP2SDKSetup_5.1.1.bin it provided options for a free desktop-read-only licence or a paid desktop-read-write-only licence. I chose the first but maybe that has to do something with finding and accessing the library?
Anyone else had the same problem before? Your help would be very much appreciated.
Cheers,
George

The desktop-read-only option is the good one.
I had the same problem, but I found the solution with luck :
The instructions we followed are written for 32 bits architectures.
In this lign :
sudo ln -s /usr/local/ERDAS-ECW_JPEG_2000_SDK-5.1.1/Desktop_Read-Only/lib/x86/release/libNCSEcw.so /usr/local/lib/libNCSEcw.so
I've just replaced the /x86/ folder by /x64/
So a 64 bits libNCSEcw.so was linked in /usr/local/lib.
Then, I've executed next commands :
sudo ldconfig
sudo apt-get install libgdal-ecw-src
sudo gdal-ecw-build /usr/local/ERDAS-ECW_JPEG_2000_SDK-5.1.1/Desktop_Read-Only
gdalinfo --formats | grep -i ecw
And voila :
ECW (rw+): ERDAS Compressed Wavelets (SDK 5.1)
JP2ECW (rw+v): ERDAS JPEG2000 (SDK 5.1)
I hope it can help you.
Cheers,
Vincent

Related

updated libraries are incompatible

OS -> ubuntu 11.10( Yes,its quite old version but unfortunately we cant upgrade it)
Updated driver -> ftdi driver from libftd2xx.so.1.1.1 to libftd2xx.so.1.1.12
IDE -> ecillpse
Issue -> failed to include update library
Error ->
/usr/bin/ld: skipping incompatible /usr/local/lib/libftd2xx.so when
searching for -lftd2xx
/usr/bin/ld: skipping incompatible
/usr/local/lib/libftd2xx.a when searching for -lftd2xx
Overview:
I have embedded system which uses ftdi chip. I have to include some new functions in my coding so for that reason I have upgraded the library . Below are the following steps I have followed
tar xfvz libftd2xx1.1.12.tar.gz
cd build/arm926
cp lib* /usr/local/lib
Copies the libraries to a central location.
chmod 0755 /usr/local/lib/libftd2xx.so.1.1.12
ln -sf /usr/local/lib/libftd2xx.so.1.1.12 /usr/local/lib/libftd2xx.so
Building the shared-object examples.
cd examples
make -B ( I followed these steps as written in their documentation but no idea why I did)
Run ldconfig
sudo ldconfig -l /usr/local/lib/libftd2xx.so.1.1.12
Run file libftd2xx.a
o/p libftd2xx.a: current ar archive
May you guys please help me or point me where I am committing mistake .
Thanks a lot
Sorry guys , I was following instructions from ftdi coument and instead of going into i386 directory , i went into arm986 .

pg_ctl: error while loading shared libraries: libpq.so.5

I'm trying to get postgres server status with:
sudo /etc/init.d/postgres status -u postgres
But getting following error:
/home/alex/olddisk/usr/local/pgsql/bin/pg_ctl: error while loading shared libraries: libpq.so.5: cannot open shared object file: No such file or directory
I added:
export LD_LIBRARY_PATH=""
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib/"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/alex/olddisk/usr/local/pgsql/lib/"
to my .bashrc, but it didn't help.
Thank you.
I ran into this error when I built postgresql from source using the --prefix flag. Building from source installs the necessary shared libs to the libs folder under the prefix directory you specified, instead of the usual place installations put shared libs. To solve the problem I just added the [prefix].libs folder to the LD_LIBRARY_PATH environment variable. For example, after building postgres using --prefix /mike/sandbox/postgres, the below command solved the issue:
export LD_LIBRARY_PATH=/mike/sandbox/postgres/lib:$LD_LIBRARY_PATH
I think this issue is duplicated, I faced the same problem and posted a solution here.
try this:
1: Know the path of "libpq.so.5"
find / -name libpq.so.5
Output example: "/usr/pgsql-9.4/lib/libpq.so.5" If found nothing, check if you have already installed the suitable postgresql-libs for your postgresql version and your OS platform
2: Symbolic link that library in a "well known" library path like "/usr/lib":
ln -s /usr/pgsql-9.4/lib/libpq.so.5 /usr/lib/libpq.so.5
Attention: If your platform is 64 bit, you MUST also symbolic link to 64 bit libraries path:
ln -s /usr/pgsql-9.4/lib/libpq.so.5 /usr/lib64/libpq.so.5
3: Be happy !
Please ensure you have 'postgresql94' package installed as well (in addition to postgresql94-server, postgresql94-lib, postgresql94-devel and whatever other PG related package you already have). These libraries get installed along with that package.
Some ideas:
Your modified ~/.bashrc only takes effect when you start a new (interactive) shell. Though catching up on that will not help you because:
/etc/sudoers, your configuration file of sudo, probably specifies env_reset. This means, that /etc/init.d/postgres will not see the content of $LD_LIBRARY_PATH of your shell.
Insert debug statements in /etc/init.d/postgres to verify what I told you: echo "LDPATH: $LD_LIBRARY_PATH" >&2
Check /etc/init.d/postgres. Probably you will have to insert the third one of your export statements near the start of this script. Or you will have to update an existing export LD_LIBRARY_PATH= statement.
Have you installed the necessary libraries?
If you are using ubuntu try:
sudo apt-get install libpq libpq-dev

Setting a resolution for xvfb-run and wkhtmltopdf / wkhtmltoimage

I'm trying desperately to give xvfb-run some resolution arguments to take screenshots of websites with wkhtmltox in different resolutions.
I'm using both xvfb-run and wkhtmltox on CentOS.
xvfb-run --server-args="-screen 0 1024x768x24" wkhtmltoimage http://www.whatismyscreenresolution.com/ /tmp/bla.png
Unfortunately my arguments are not respected by xvfb-run. It has always a resolution of 800x600. What am I doing wrong here?
Thanks for any help!
You forgot this option: --use-xserver.
So the whole command is:
xvfb-run --server-args="-screen 0 1024x768x24" wkhtmltoimage --use-xserver http://www.whatismyscreenresolution.com/ /tmp/bla.png
(I tested with wkhtmltopdf, but it should be the same with wkhtmltoimage)
Add a comma between parameters. In your case "-screen 0, 1024x768x24".
Let me know if it helped you.
Regards,
HBK
Are you running wkhtmltoimage with a patched QT? If your QT version is NOT patched, a lot of features are ignored, including any commands sent from xvfb-run.
you can check your version like so:
/usr/bin/wkhtmltoimage --version
Change the path to wherever you've stored your wkhtmltoimage file. If the returned version doesn't include "patched QT", then that's probably where you should start. You can download a patched QT version from here:
https://wkhtmltopdf.org/downloads.html
Installation of a patched QT version is not too complicated, try a variation of the following (I'm running Ubuntu 20, other distros will need tweaking):
cd ~
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb
sudo dpkg -i wkhtmltox_0.12.6-1.focal_amd64.deb
sudo apt-get install -f
/usr/local/bin/wkhtmltoimage --version
Best of luck.

no matlab executable were found

I tried to install the "MATLAB - Scientific computing environment" from the software center but failed, because I got the error message "No MATLAB executables were found in the directories you specified. This package requires at least one local installation of MATLAB." My linux version is ubuntu 12.10. Any help will be appreciated.
Try the following:
cd /usr/local/bin/
# Replace R2012a by your version:
sudo ln -s /usr/local/MATLAB/R2012a/bin/matlab matlab
Otherwise you can also try sudo apt-get install matlab-support, which is basically an assistant for configuring MATLAB.
Now the command matlab should launch MATLAB.

libgfortran: version `GFORTRAN_1.4' not found

I am getting the following error when I trying to a run mex file in MATLAB:
??? Invalid MEX-file
'findimps3.mexa64':
/MATLAB/bin/glnxa64/../../sys/os/glnxa64/libgfortran.so.3: version `GFORTRAN_1.4' not found (required by /usr/lib/libblas.so.3gf)
Any ideas how to solve this problem?
update:
I found out that "strings MATLAB/.../libgfortran.so.3 | grep GFORTRAN" output GFORTRAN_1.0. I tried to changed libgfortran inside MATLAB but it didn't work. Not I think it's better to find a suitable libblas that works with GFORTRAN_1.0.
read this link, it explains how to configure matlab on some linux systems.
here the steps that are relevant to you:
To enable running external programs, […] fortran libraries need to be properly updated and linked. Look at the output of this command:
ll "$MATLABDIR/bin/glnxa64/"
It is likely that [this link] exist:
libgfortran.so.3 -> libgfortran.so.3.0.0
Search for [this library] on your machine:
locate libgfortran.so
[…] Update Matlab's links to point to these newer versions:
sudo ln -sf [location of libgfortran.so.3.0.0] "$MATLABDIR/bin/glnxa64/libgfortran.so.3"
I (think I) fixed this problem by running matlab with LD_PRELOAD, like this
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libfreetype.so:/usr/lib/x86_64-linux-gnu/libgfortran.so.3 matlab
Notice freetype was another library I was having a similar problem with.
In my case the following command worked:
sudo ln -sf /usr/lib/gcc/i686-linux-gnu/4.7/libgfortran.so /usr/local/MATLAB/R2012a/sys/os/glnx86/libgfortran.so.3
Matlab was complaining it couldn't find the GFORTRAN1.4 in the following location:
/usr/lib/gcc/i686-linux-gnu/4.7/libgfortran.so
So I linked this location to the library I had :
/usr/local/MATLAB/R2012a/sys/os/glnx86/libgfortran.so.3
I found the location of this library by using the locate command as given above:) Thanks for the help:)
In my case, fixed by
$ ln -sf /usr/lib64/libgfortran.so.3.0.0 /opt/matlab/sys/os/glnxa64/libgfortran.so.3
Errors I meet when using CDSP:
csdp: /opt/matlab/sys/os/glnxa64/libgfortran.so.3: version GFORTRAN_1.4' not found (required by /usr/lib64/atlas/libptf77blas.so.3)
csdp: /opt/matlab/sys/os/glnxa64/libgfortran.so.3: versionGFORTRAN_1.4' not found (required by /usr/lib64/atlas/libf77blas.so.3)
I just ran into the same problem (error usr/lib64/libgfortran.so.3: version `gfortran_1.4' not found) and it was actually not hard to fix. The problem seems to be that gfortran_1.4 version of libgfortran.so.3 comes from the release gcc-4.6.2 (i.e. fortran 4.6).
What I did was downloaded gcc-4.6.2 and built, using the steps: tar -xvf gcc-4.6.2.tar.gz cd gcc-4.6.2 ./contrib/download_prerequisites cd .. mkdir objdir cd objdir $PWD/../gcc-4.6.2/configure --prefix=$HOME/gcc-4.6.2 --enable-languages=c,fortran,c++,go make make install
Then, once everything was made, I went to the directory where the new, fresh libgfortran.so.3 was sitting (in my case it was /home/testuser/objdir/x86_64-unknown-linux-gnu/32/libgfortran/.libs/)
I copied this version of libgfortran.so.3, and went to the directory where my program was expecting to find libgfortran.so.3. I replaced the old one (the old libgfortran.so.3) with the new one (the one we just copied).
The problem instantly went away. I hope this helps you too!