Installing osm2pgsql from source not actually installing? - macos

I'm trying to install osm2pgsql from source on a Mac using Terminal.
I ran these commands:
git clone git://github.com/openstreetmap/osm2pgsql.git
cd osm2pgsql
./autogen.sh && ./configure && make
And it runs, but then if I try to run an osm2pgsql command, it says:
-bash: osm2pgsql: command not found
There are no further instructions online about how to install from source, so I'm not sure what I'm missing here.
Anyone help me?
Thanks

You might need to install the build-essential and automake packages.
Type the following in the terminal (before trying to install osm2pgsql):
sudo apt-get install build-essential
sudo apt-get install automake
sudo apt-get install checkinstall

You need to add it to your path! To "install" something is really just to let the OS know where it is, because it's too dumb to figure that out on its own, even if you're in the same directory with it. In Unix, every command is a program; when you enter a command, the OS checks the "path" which is just a list of directories where that command might live.
First of all, to test that it's compiled and working properly in its own directory:
./osm2pgsql
If that works, add the current directory to the path variable:
export PATH=$PATH:`pwd`
Now you can execute the command from anywhere.

Related

Why I failed to make setup when I was trying to install RedisTimeSeries?

I just followed what was said in README(https://github.com/RedisTimeSeries/RedisTimeSeries) to install RedisTimeSeries on Ubuntu.what I did following the document But when I tried to execute "make build", it showed the information. And I'm sure that I have already executed "make setup", so I guess I failed to make setup before. I was wondering what was wrong and how I can do to install RedisTimeSeries?
Just like what I said before, I followed the instructions in README and try to install RedisTimeSeries on Ubuntu. This is what it shows when I make setup. I'm expecting a method which can help me accomplish this task. Thanks for all answers.
Try to execute the following prior to building:
apt-get update
apt-get upgrade
apt-get install -y sudo git pkg-config make wget build-essential cmake m4 automake peg libtool autoconf python3
Let me know if it solves your problem.

sudo dkms add command issue

I am trying to setup my WIFI adapter settings. I have already run command
sudo apt install git build-essential dkms
when i try to do this
sudo dkms add ./rtlwifi_new
that shows me following error
Error! Could not find module source directory.
Directory: /usr/src/.-rtlwifi_new does not exist.
how I can fix this?
don't run this command in "rtlwifi_new" directory
so back one directory
cd ..

Unable to install package using luarocks on osx

I installed lua on my OSX 10.10 machine using brew install lua. The version that got installed was 5.2.4. LuaRocks was installed along with the lua package. But when i run luarocks install <package_name> i get Error: ##HOMEBREW_PREFIX## does not exist and your user does not have write permissions in. i tried using sudo luarocks install <package_name> as well, but it gives the same error. How to fix this ?
Please Help.
Thanks
This was a bug in the way we relocate text files to ensure wider bottle portability for non-/usr/local users.
It was resolved a couple of weeks back, July 31st I believe. Presuming your Homebrew is in a standard location, if you do:
rm /usr/local/etc/luarocks52/config-5.2.lua && brew update && brew reinstall lua
The problem should be resolved now. Apologies!
I had the same problem when using the luarocks when installed with homebrew, try installing luarocks again like this:
$ wget http://luarocks.org/releases/luarocks-2.2.1.tar.gz
$ tar zxpf luarocks-2.2.1.tar.gz
$ cd luarocks-2.2.1
$ ./configure; sudo make bootstrap
I took this code snippet from here: https://luarocks.org/
I managed to install all the modules that I required without problems after doing this.

How to install ruby on linux in a specific folder

I try to install ruby and rails to start to learn ruby on rails.
I work on Windows. After many search and tries, I gave up and installed a fresh ubuntu 14 x64 in a VirtualBox.
I installed ruby with apt-get, but its files get spread all over the file system (/bin, /var...). So, I have to use always sudo and search all over the place when installing gems.
I would like, just like in windows, find a ruby tar.gz which I can decompress in a folder of mine, with all files at the same place, where I have the "control" over the files, and I can watch easily what it's hapenning while installing gems, rails, etc...
The problem : I cannot find any tar.gz (or similar archive) of ruby for linux which I simply can uncompress in a folder and work with it (I can manage the $path). The only one I can find is for Windows !
Thanks !
It sounds like what you want is Ruby's source code. Go to https://www.ruby-lang.org/en/downloads/ and look under "Compiling Ruby - Source Code". That's where you'll find the .tar.gz files you want. You'll need to compile and install it before you can actually use it. Installing normally copies files "all over the file system", but you can force it to install to a specific folder by passing the --prefix option to the ./configure script.
$ tar -xf ruby-2.2.1.tar.gz
$ cd ruby-2.2.1
$ ./configure --prefix=/my/ruby/dir
$ make && make install
You may need to install some dev packages in order to get it to compile, but any compilation errors should make it clear what you need.
These instructions are also described here.
Thank you Max for your response.
In case someone else tries to compile ruby on a fresh new ubuntu, this is what I had to do to build and use it with success :
Install missing dependencies :
get the latest "Stable Snapshot" from https://ftp.ruby-lang.org/pub/ruby/stable-snapshot.tar.gz and not the "Current stable"
sudo apt-get install libffi-dev
sudo apt-get install zlibc zlib1g zlib1g-dev
sudo apt-get install openssl
sudo apt-get install libssl0.9.8 [[[ first, find the latest version with : apt-cache search libssl | grep SSL ]]]
sudo apt-get install ca-certificates
sudo apt-get install libssl-dev
sudo apt-get install libreadline-dev
Then :
Edit downloaded file tools/rbinstall.rb, goto line 714 and correct the typo :
change "rescue LoadErroe" to "rescue LoadError" (not corrected in date of 20 March 2015).
Run Max's instructions above
Don't move the ruby destination folder declared with "--prefix" (even if you try to correct the shells in ruby/bin)
Finally, for using rails :
sudo apt-get install libsqlite3-dev
sudo apt-get install nodejs ==> inorder to have a js runtime

MagickWand ./configure can't find MagickWand-config

I've been trying unsuccessfully to install ImageMagick and am stuck at this point. I've dled and phpized MagickWand and am trying to run ./configure and get the error:
checking MagickWand-config in default path... configure: error: Cannot locate configuration program MagickWand-config
I've tried both export PATH=$PATH:/opt/local/bin
and export PATH=$PATH:/opt/local/bin/
and have also tried adding the paths to my .bash_profile file. I've also confirmed that there is a MagickWand-config executable in my /opt/local/bin directory.
Suggestions?
Try sudo apt-get install libmagickwand-dev and then run ./configure. Worked for me on Ubuntu 10.04 after grabbing MagickWand 1.0.8 source from http://www.magickwand.org/download/php/.
Check MagickWand-config - if it doesn't install,
Run sudo apt-get install libmagickwand-dev in your server
Reference the MagicWand-config man pages for further options

Resources