I'm working on a Debian machine with postgresql installed. I need to find shp2pgsql (a utility that converts shapefiles into SQL, as the name suggests).
I've seem suggestions that it's located in the bin directory of postgresql, however I don't know where to find this. I can't locate shp2pgsql through a simple find (probably much too simple, since my Unix skills are not that good):
$ find ~ -name 'shp2pgsql' -print
$
Any suggestions?
Thanks - apologies for the basic question!
I'm pretty sure you need PostGIS installed - its part of that package. You can install it from that site, or its likely that Debian's package manager even has it. Where it ends up depends on package builder.
Actually finding it, if its not in your PATH after you install PostGIS, is probably easiest done through locate shp2pgsql although you may need to updatedb first.
Additionally, you can find your Postgres relevant directories by running pg_config .
The first argument to find is the path from which to search. ~ is your home directory. Your command searches shp2pgsql from your home directory, not in the bin directory. With find, user command find /usr/lib/postgresql/ -name shp2pgsql.
If your system has locate installed, you could also locate shp2pgsql.
Related
I am using Ubuntu 12.04. I have installed doxygen 1.8.3.1 using make install.
I would like to uninstall the doxygen built by make, but I don't find any way to do it using make (uninstall or clean...).
In the Makefile there is no reference to uninstall it the software. :(
Unfortunately I can't use the sudo apt-get remove doxygen because it wasn't an installed. :(
I don't find anything related on the internet.
Can anyone help me, please?
Thank you in advance,
Fabiola
There is no "uninstall" target. You need to do a "rm" be hand. If you used the standard prefix path "/usr/local" then
rm /usr/local/bin/doxygen
rm /usr/local/man/man.1/doxygen.1
(more if you install the docs are wizard). Depend on the user used for install, you need sudo to do it.
I know this question is old, but since it is the first result in google I would like to share another way of uninstalling Doxygen built from source. In the build directory where you've ran make there should by a file name install_manifest.txt. That file contains paths to files that were installed using make install command. All you need to do is to run the following command:
sudo xargs rm < install_manifest.txt
Of course this assumes that you've kept the build directory or at least the install_manifest.txt file. If not you need to remove the files by hand as somebody already suggested.
After hours of searching Google and StackOverflow, I haven't been able to resolve this issue...
I'm trying to install Sphinx Search on my VPS, but I have absolutely no idea what I'm doing. All I know is that this search feature is extremely important to my project.
I've tried the following commands in puTTy to unpack the Sphinx tarball:
tar xzvf sphinx-2.0.6-release.tar.gz
tar -xzvf sphinx-2.0.6-release.tar.gz
It says there's no such file or directory. I know the file is there because I put it there myself, so I'm assuming now that I've misunderstood what is going on here.
Can someone get me past this step so that I can get lost on the next one?
It says there's no such file or directory. I know the file is there because I put it there myself,
Probably not in the right folder - need to 'cd' into the folder containing the file.
But as you dont seem that familer with linux, would suggest using the RPM file instead - so dont have to compile from source.
get the RPM from
http://sphinxsearch.com/downloads/release/
and then upload that. Then use "yum localinstall nameofrpmfile.rpm"
Check the output of uname -a to find if you have 64bit or 32bit system. If mentions x86_64 you have 64bit, and so want the x86_64 RPM file.
So I've installed Postgresql via Homebrew, and it looks like the contrib directory is missing. And all of the tutorials I've read to install Trigram require this.
$ cd /usr/local/Cellar/postgresql/9.1.2/share/postgresql/contrib
-bash: cd: /usr/local/Cellar/postgresql/9.1.2/share/postgresql/contrib: No such file or directory
Can anyone point me in the right direction to get Trigram installed (pg_trgm.sql)? I'm lost here.
Thanks.
Just found out that the correct path is....
/usr/local/Cellar/postgresql/9.1.2/share/postgresql/extension
Wanted to share for anyone else running into this.
I ran the same issue, but found that the correct path is:
/usr/local/Cellar/postgis15/1.5.3/share/postgis/
Of course check out your PostGIS version number to match your exact path. This folder is where files like postgis.sql or spatial_ref_sys.sql are found... I guess this is what you need?
I have already installed Perl and libcurl using Cygwin's package manager. Now, I'm trying to install WWW::Curl. I have to specify the cURL include directory in WWW::Curl's Makefile.PL, but I have no idea where to look for this. Thanks for your time.
It will try to guess automatically. If it does not work, see the README.
P.S. LWP is more convenient to use.
edit: Using your package managers own packages is often preferred when using your system perl, cygwin has a package for perl-WWW-Curl, install this package rather than building your own.
Most likely I think you are missing the libcurl-devel package. Although you mention that libcurl is installed, please ensure that libcurl-devel is installed via the cygwin package management application, and try again if required.
WWW:Curl will search for the correct include path, looking for curl/curl.h, if it cannot find the file then it might be looking in the wrong places, you'll have to do a manual install:
download and unpack the package from cpan
read the included README file to understand this process
search your cygwin installation for a file called curl/curl.h note the directory that it is in.
modify the Makefile.PL so that #includes has the directory noted above included.
run perl Makefile.PL
run make && make install
This process is essentially the same problem as the process for a native Win32/strawberry perl install, in that it doesnt know where libcurl is located. you can check the README.Win32 file for similar instructions.
The libcurl-devel package installs the curl/curl.h file to usr/include/ which is a path that is already searched by Makefile.PL.
To however you say you have no idea where to look, locate the curl.h you can do the following:
find / -name curl.h
But be warned this could take a long time, you could try specific locations such as /usr
find /usr -name curl.h
Or even better you can look at the package contents to find the file location:
https://cygwin.com/cgi-bin2/package-cat.cgi?file=x86%2Flibcurl-devel%2Flibcurl-devel-7.41.0-1&grep=libcurl
To echo Alexandr's answer, LWP is more convenient to use cross platform, while covering the same features, it can also do a lot more.
Error: Can't load '/home/oracle/.cpan/build/DBD-Pg-2.16.1/blib/arch/auto/DBD/Pg/Pg.so' for module DBD::Pg: libpq.so.5: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/DynaLoader.pm line 230.
Did anyone have similar error while instaling DBD::Pg perl module ? what can I do to fix it ?
You should go under perl to solve these dynamic linking problems. Use strace program &> out, and then grep for libpq.so.5. My guess is your libpq.so.5 is in the wrong location, or your DynaLoader is misconfigured. Read the docs on #dl_library_path.
You can see what your search path is with this (the strace will also show it trying to find the .so by checking each directory):
perl -MDynaLoader -le'print for #DynaLoader::dl_library_path;'
Make sure your libpq.5.so falls in one of those. The strace will also show if the kernel is returning an error to DynaLoader that it is cloaking; moreover, it will certainly tell you everything DynaLoader knows.
The libpq.so.5 file is missing, which indicates that you do not have the Postgresql client library installed. On Ubuntu this file is provided by the libpq5 package.
Make sure the path to the PostgreSQL library is in either ld.so.conf or in a file in ld.so.conf.d and re-run "sudo ldconf" (or sudo /sbin/ldconf). That's taken care of this issue when I've encountered it in the past.
I know lots of people have answered your question but I thought I'd add one more thing. Makefile.PL locates the postgres libraries by executing pg_config. If this can't be found on your path, then you will find this sort of error. Interestingly though, it looks for the headers in the same way. Try running pg_config from your terminal and see what the output is. If it's not found in your path, locate it, add to your path and try to build DBD::Pg again