“no taos in java lib path” when using TDengine on MacOS - tdengine

Does anyone use TDengine database on MacOS?
I installed Java and TDengine, and configure the path. However, it still reports the following error:
no taos in java lib path
Do I miss some steps?

You can try this command:
ln -s /usr/local/lib/libtaos.dylib /Library/Java/Extensions/libtaos.dylib

Related

How to install Apache Solr on Mac OS?

I need to create an information retrieval system using Solr.Please assist how to do that on Mac computer.
Some quick notes on how to install solr on a Mac.
download openjdk. I downloaded openjdk-14.0.1_osx-x64_bin.tar
set the PATH environment variable to include
“your_path/jdk-14.0.1.jdk/Contents/Home/bin”
download ant (to compile solr). apache-ant-1.9.15-bin.tar.bz2
add to the PATH again. “your_path/apache-ant-1.9.15/bin”
from solr README.md, “ant compile”
from solr README.md, “ant server”
chmod +x solr* from the solr/bin directory
bin/solr start
test http://localhost:8983/solr/

postgreSQL error initdb: command not found

i was installing postgresql on ubuntu using linuxbrew:
brew install postgresql
it seems to work fine but after that because i was installing PostgreSQL for the first time i tried creating a database:
initdb /usr/local/var/postgres -E utf8
but it returned as:
initdb: command not found
i tried running the command with sudo but that doesn't helped
run locate initdb it should give you the list to chose. smth like:
MacBook-Air:~ vao$ locate initdb
/usr/local/Cellar/postgresql/9.5.3/bin/initdb
/usr/local/Cellar/postgresql/9.5.3/share/doc/postgresql/html/app-initdb.html
/usr/local/Cellar/postgresql/9.5.3/share/man/man1/initdb.1
/usr/local/Cellar/postgresql/9.6.1/bin/initdb
/usr/local/Cellar/postgresql/9.6.1/share/doc/postgresql/html/app-initdb.html
/usr/local/Cellar/postgresql/9.6.1/share/man/man1/initdb.1
/usr/local/bin/initdb
/usr/local/share/man/man1/initdb.1
So in my case I want to run
/usr/local/Cellar/postgresql/9.6.1/bin/initdb
If you don't have mlocate installed, either install it or use
sudo find / -name initdb
There's a good answer to a similar question on SuperUser.
In short:
Postgres groups databases into "clusters", each of which is a named collection of databases sharing a configuration and data location, and running on a single server instance with its own TCP port.
If you only want a single instance of Postgres, the installation includes a cluster named "main", so you don't need to run initdb to create one.
If you do need multiple clusters, then the Postgres packages for Debian and Ubuntu provide a different command pg_createcluster to be used instead of initdb, with the latter not included in PATH so as to discourage end users from using it directly.
And if you're just trying to create a database, not a database cluster, use the createdb command instead.
I had the same problem and found the answer here.
Ubuntu path is
/usr/lib/postgresql/9.6/bin/initdb
Edit: Sorry, Ahmed asked about linuxbrew, I'm talking about Ubuntu.
I Hope this answer helps somebody.
I had a similar issue caused by the brew install postgresql not properly linking postgres. The solve for me was to run:
brew link --overwrite postgresql
you can add the PATH to run from any location
sudo nano ~/.profile
inside nano go to the end and add the following
# set PATH so it includes user's private bin if it exists
if [ -d "/usr/lib/postgresql/14/bin/" ] ; then
PATH="/usr/lib/postgresql/14/bin/:$PATH"
fi
and configure the alternative
sudo update-alternatives --install /usr/bin/initdb initdb /usr/lib/postgresql/14/bin/initdb 1

Google App Engine PHP SDK - How to install on Ubuntu (15.10)?

Google official documentation is available here:
https://cloud.google.com/appengine/downloads#Google_App_Engine_SDK_for_PHP
But it doesn't provide sufficient information about the following step:
"4 - Build and install the PHP interpreter and App Engine PHP extension. Specify the path to php-cgi and gae_runtime_module.so when running the development server."
I'm using a new Virtualbox machine with Ubuntu 15.10 and PhpStorm to test GAE.
Could someone please provide clear instructions about step 4? What do I need to do to install the php interpreter and the App Engine php extension?
P.s. I've already searched with google but I only found old/confusing tutorials
That GAE PHP extension seems like a quite new thing. Don't remember using it on the SDK in Ubuntu 14.04.
You need to build PHP and that extension from source. You should grab the latest PHP5.5 branch from their source repo (http://php.net/git.php) and build it. That linked page contains instructions on building PHP but the procedure is similar to the following:
$ git clone <php-src>
$ cd ./php-src/
$ git checkout PHP-5.5
$ ./buildconf
$ ./configure --prefix="/opt/php55"
$ sudo make && sudo make install
And remember to pick the modules and packages you want to compile with PHP5.5 to be used in the SDK. I think Google had an official list of modules and extensions they use inside GAE PHP and inside the SDK PHP. The prefix argument tells the compiler where to install the resulting application.
Then you need to get that source for the PHP extension and build it
$ git clone https://github.com/GoogleCloudPlatform/appengine-php-extension
$ cd appengine-php-extension
$ phpize # remember to use the phpize from the just built PHP5.5 binaries
$ ./configure
$ sudo make && sudo make install
(That Git repository contains detailed building instructions so you should probably refer to them when building.)
Enable the resulting .so for the PHP5.5 you just built using the PHP configuration files.
After that you need to install the PHP SDK and configure it to use the newly built PHP binary
$ dev_appserver.py <...> --php_executable_path=/opt/php55/bin/php-cgi
The SDK will let you know if the built PHP binaries are incompatible with the SDK version you use. I remember compiling the PHP from source around 5 times before it worked without any warnings.
But essentially they are telling you to compile PHP from source, then compile their extension from source and then use the built PHP+extension with the downloaded SDK. These instructions are from the top of my head so you may need to adjust the commands and procedures.
The process can be simplified by using Docker, here is an image you can use: https://hub.docker.com/r/mhariri/docker-google-appengine-php/
To run your app, you just need docker installed, and then run the following command in your app directory:
docker run -it -v $(pwd):/app --rm --net=host mhariri/docker-google-appengine-php

installing postgres 9.2 on Mac OSX 10.6 with KyngChaos package

I'm trying to install postgres 9.2 on a mac 10.6 using using KyngChaos (because ultimately I'd like to enable PostGIS, and this seems to be the best package to that with).
I get exactly the problem spelled out at the bottom of the page: http://www.kyngchaos.com/software/postgres
--
NOTE: I've had reports of the installer not initializing the data cluster, which results in Postgres not starting. It seems to be random, and I haven't figured out the cause yet. If Postgres won't start (you get an error "could not connect to server: No such file or directory" when trying to connect with psql), try manually initializing the cluster with:
/usr/local/pgsql-9.1/bin/initdb -U postgres \
-D /usr/local/pgsql-9.1/data --encoding=UTF8 --locale=en_US"
Or see the Locales and Encodings readme if you need a different locale or encoding.
Then stop and start Postgres as specified in the readme.
--
I run
/usr/local/pgsql-9.1/bin/initdb -U postgres -D /usr/local/pgsql-9.1/data --encoding=UTF8 --locale=en_US"
which opens up a new line to enter additional commands with
>
but i'm lost there, even after combing the readme.

PostgreSQL 8.2 unsupported version (1.11) in file header message to do backup restore

I'm trying to restore a backup in postgreSQL pgAdmin and I get the following error message:
C:\Program Files\PostgreSQL\8.2\bin\pg_restore.exe -i -h localhost -p 5432 -U postgres -d gsan_comercial -v "C:\Users\usr\Desktop\GSAN\Data Base\gsan_comercial_pmss.backup"
pg_restore: [archiver] unsupported version (1.11) in file header
Process returned exit code 1.
I can not find the reason for this.
Tks
The version you find in the dump file header is related to the version of the tools used to do the dump, i.e., pg_dump. It is possible to dump an 8.2 database using pg_dump from a later version (for example one from the 8.4 distribution) because all tools are backward compatible but in the end you'll get a file that can only be restored using the new tools.
I suppose that is what happened and you're now trying to restore an 8.2 dump done using 8.4 tools on a pgAdmin using 8.2 tools.

Resources