Errors in Vapor setup on Ubuntu 14.04 (Windows) - swift

Following steps from https://vapor.github.io/documentation/getting-started/install-toolbox.html are leaded to this error:
$ curl -sL toolbox.vapor.sh | bash
/swift-3.0/usr/bin/swift-build: error while loading shared libraries: libFoundation.so: cannot enable executable stack as shared object requires: Invalid argument
Any ideas?

I don't have Ubuntu on Windows to check with, but this is a known issue.
This commenter on GitHub appears to have found a solution.
apt-get install execstack
execstack -c {swift_path}/usr/lib/swift/linux/libFoundation.so

Related

How to solve the error of Postgresql Client not installed on Ubuntu 18.04

Just install the Postgresql on Ubuntu 18.04 and having the error of PostgreSQL client
Warning: No existing local cluster is suitable as a default target.
Please see man pg_wrapper(1) how to specify one.
Error: You must install at least one postgresql-client-<version> package
I tried all the solutions that are on the StackOverflow and other forums but not succeed to solve the error
Following are the solutions that I tried
1. psql --cluster 10/apps [other arguments]
when I try the first solution it give me the error
Error: Invalid version 10 specified with --cluster
2. psql -p 5432
3. sudo apt-get install postgresql-client-10
when try the third solution it shows the following
postgresql-client-10 is already the newest version (10.5-0ubuntu0.18.04).
4. gedit ~/.bashrc
PATH=/usr/local/pgsql/bin:$PATH
export PATH
Can someone tell what the exact solution to solve the error.
Your 3rd solution is almost there, make sure to run sudo apt-get install postgresql-10 too.

Where is libpq-fe.h on a Travis-CI instance?

I'm trying to build a postgres database adapter (luapgsql) as part of my setup:
install:
- sudo luarocks install --server=http://rocks.moonscript.org/dev luapgsql
But the build can't find libpq-fe.h:
Error: Could not find expected file libpq-fe.h, or libpq-fe.h for PQ --
you may have to install PQ in your system and/or pass PQ_DIR or
PQ_INCDIR to the luarocks command. Example: luarocks install luapgsql
PQ_DIR=/usr/local
I've tried what's suggested above, apt-get install libpq-dev and just find \ -name libpq-fe.h. No luck so far. Any ideas where it might be?
So it turns out that running pg_config as part of the install: was the answer. I could read the output in the log.
In the end, the line that worked for me for installing luapgsql on travis is:
sudo luarocks install --server=http://rocks.moonscript.org/dev luapgsql PQ_INCDIR=/usr/include/postgresql PQ_LIBDIR=/usr/lib/x86_64-linux-gnu

Signurl command requires the pyopenssl library in gsutil in google storage in creatiing signed URL

I am trying Create a signed URL with gsutil .
following is the command
$ gsutil signurl -d 10m path/to/privatekey.p12 gs://bucket/foo
mentioned in site https://developers.google.com/storage/docs/accesscontrol
I also issued a same like command with my bucket name and object as below
gsutil signurl -d 10m C:\Users\Desktop\javascript\service\4e263da.p12 gs://code-sample/File1
but i got following error
"signurl command requires the pyopenssl library try pip install
pyopenssl or easy_install pyopenssl"
.So,i installed PyOpenSSL for window from here
https://pypi.python.org/pypi/pyOpenSSL/0.13 .My python version is 2.6.Still i am getting same error in running the command. So my question why command signurl is still not recognized after i installed pyopenssl in gsutil
Install with
pip3 install --user pyopenssl
and it should works (especially if you're running in the cloud console)!
was getting this error and tried a variety of python pyopenssl options, but this worked for me in the end, on:
Debian 10 with
Google Cloud SDK 345.0.0
gsutil version: 4.63
sudo apt-get install python3-openssl
I had the same problem with Python v3.7.5 and gsutil v4.46.
To fix the issue I installed pyopenssl for Python 2: pip2 install --user pyopenssl
The issue might be because you are using 64 bit system and python
Working with egenix-pyopenssl-0.13.4.1.0.1.9.win32-py2.7 - 32bit and python 32 bit solved this problem for me... Even google document recommends use of 32bits
I'm running Python 2.7 with same issue.
ProcMon was showing that the bundled Python was being executed (%LOCALAPPDATA%\Google\Cloud SDK\google-cloud-sdk\platform\bundledpython\python.exe) and not Python in the path variable.
I renamed the 'bundledpython' directory and re-ran 'gsutil signurl' and it ran successfully.
Note: this is after the crypto library was installed (https://cloud.google.com/sdk/crypto)
The problem is rooted in the gsutil shell script and the python libraries. The gsutil script expects Python 2.
pip3 uninstall pyOpenSSL
pip2 install pyOpenSSL
After the above I could successfully sign URLs using gsutil

Error "the PGXS Makefile cannot be found" when installing PostGis on Debian

I am in the process of installing PostGis over psql on a Debian machine (actually crunchbang).
I have completed the following steps:
$ wget http://download.osgeo.org/postgis/source/postgis-2.0.3.tar.gz
$ tar xzf postgis-2.0.3.tar.gz
$ cd postgis-2.0.3
$ ./configure
On the final step I get the following error:
configure: error: the PGXS Makefile /usr/lib/postgresql/9.1/lib/pgxs/src/makefiles/pgxs.mk cannot be found. Please install the PostgreSQL server development packages and re-run configure.
The issue is that I do already have Postgres installed:
$ psql --version
psql (9.1.9)
I have checked this on two machines with the same configuration and get the same error. What am I missing here?
PostgreSQL is broken down into several packages, and having psql installed doesn't imply that the development packages are also installed.
According to the error message:
Please install the PostgreSQL server development packages and re-run
configure
you need:
# apt-get install postgresql-server-dev-9.1
Also note there's a APT pgdg repository providing recent pre-compiled versions of postgres-related packages (including postgis) that you may use instead of self-compiling.
If your system is set up to use this repository, just do:
# apt-get install postgresql-9.1-postgis-2.0
Daniel's answer works great except that it needs the following update:
$ sudo apt-get install postgresql-9.1-postgis-2.1
These packages can be updated some time in future again. So, it is recommended to search for new packages using aptitude and install the appropriate one:
$ aptitude search postgis

Compiling MongoDB r2.0.2 on ubuntu 10.04 resulted in error

I am compiling MongoDB from source with instructions from http://www.mongodb.org/display/DOCS/Building+for+Linux
I ran into this error after ran "scons all":
rty/js-1.7/jsscan.c
third_party/js-1.7/jsscan.c:112:22: error: jsautokw.h: No such file or directory
third_party/js-1.7/jsscan.c: In function 'FindKeyword':
third_party/js-1.7/jsscan.c:122: warning: label 'test_guess' defined but not used
third_party/js-1.7/jsscan.c:119: warning: label 'got_match' defined but not used
scons: *** [third_party/js-1.7/jsscan.o] Error 1
scons: building terminated because of errors
I am on a 64 bit ubuntu 10.04. gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5), scons version is:
script: v1.2.0.d20100117.r4629, 2010/01/17 22:23:21, by scons on scons-dev
engine: v1.2.0.d20100117.r4629, 2010/01/17 22:23:21, by scons on scons-dev
Does anyone have the same problem? There are similar errors reported for this jsscan file in earlier versions, but has been fixed since.
Dude it worked! Do this:
sudo apt-get remove xulrunner-1.9.2-dev xulrunner-1.9.2
curl -O ftp://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz
tar zxvf js-1.7.0.tar.gz
cd js/src
export CFLAGS="-DJS_C_STRINGS_ARE_UTF8"
make -f Makefile.ref
sudo JS_DIST=/usr make -f Makefile.ref export
Then run scons all again
There is no need to uninstall "xulrunner-1.9.2-dev" and "xulrunner-1.9.2" as it's also uninstalls other packages you may need later.
Just install the newer version of scons package (I used for it scons-2.1.0).
Download scons-2.1.0.tar.gz
Install it and use the installed one instead of the scons v1.2.0 repository package for Ubuntu 10.04.
It worked for me without any additional tricks.