When I deploy my commits via Git to the server, it runs a git hook that has the line
test -f composer.phar && ./composer.phar self-update || curl -s http://getcomposer.org/installer | php;
That generates the error:
PHP Fatal error: Class 'Phar' not found in .../composer.phar on line 23
This is line 23 from composer.phar:
Phar::mapPhar('composer.phar');
I did search other questions with the same problem and checked these things:
git hook's script already has permission to be executed
I can execute ./composer.phar without error when logged in server and inside the same folder as set in the git hook's script
PHP modules has Phar enabled, checked via php -m
There is no extension=phar.so in php.ini, but I dont think it has to be because it's already enabled
PHP version: PHP 5.5.3 (cli)
What else could be causing this?
Related
I'm trying to download internal Git on Google Colab for running ML models; however, at first, I download like this
!pip install git+https://dev.azure.com/xxxxx/xxxxxx
It shown error so I found out in this website https://qdmana.com/2022/02/202202190011230865.html, showing that replace https with git like this may help.
!pip install git+git://dev.azure.com/xxxxx/xxxxxx
Nevertheless, it still shown the error as below,
Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/
Collecting git+git://dev.azure.com/xxx/xxx
Cloning git://dev.azure.com/xxx/xxx to /tmp/pip-req-build-mmz02x7l
Running command git clone -q git://dev.azure.com/xxx/xxx /tmp/pip-req-build-mmz02x7l
fatal: unable to connect to dev.azure.com:
dev.azure.com[0: 13.107.42.20]: errno=Connection timed out
dev.azure.com[1: 2620:1ec:21::20]: errno=Cannot assign requested address
WARNING: Discarding git+git://dev.azure.com/xxx/xxx Command errored out with exit status 128: git clone -q git://dev.azure.com/xxx/xxx /tmp/pip-req-build-mmz02x7l Check the logs for full command output.
ERROR: Command errored out with exit status 128: git clone -q git://dev.azure.com/xxx/xxx /tmp/pip-req-build-mmz02x7l Check the logs for full command output.
How do we address this issue?
Use codes below instead:
git clone https://{your username}:{your password}#dev.azure.com/xxxxxxx
I'm trying to install Java with the asdf plugin.
I could get the plugin but I cannot get the Java list.
The command:
asdf plugin-test java https://github.com/halcyon/asdf-java.git
gives me the message:
FAILED: list-all did not return any version
I'm on Windows 11 in a Tabby 1.0.179 / Git bash terminal.
Previously I could run the commands:
asdf plugin list
asdf plugin list all
asdf plugin add java
cd ~/dev/projects/myproject
asdf list
asdf list java
But the command:
asdf list all java
fails with the message:
Plugin java's list-all callback script failed with output:
/c/Users/stephane.2143929/.asdf/plugins/java/bin/list-all: line 1: functions: command not found
Indeed the ~/.asdf/plugins/java/bin/list-all file contains only one word: functions
As the access to the git repository is done through https and not ssh I have previously specified the GITHUB_API_TOKEN environment variable which is correctly set as seen by an echo $GITHUB_API_TOKEN command.
Regarding the git configuration, I was having the error message:
SSL certificate problem: unable to get local issuer certificate
and the property http.sslbackend had the value openssl
as showed by the command:
git config -l --show-origin
Then I typed in the command:
git config --global http.sslbackend schannel
and verified the changed property again:
git config -l --show-origin
and I could then clone some repository.
I have a BitBucket Pipeline that installs a bunch of Perl modules using cpanm. One of them fails and this is the snippet I can see in the log:
Fetching http://www.cpan.org/authors/id/P/PE/PETDANCE/ack-v3.0.2.tar.gz ... OK
Configuring ack-v3.0.2 ... OK
==> Found dependencies: File::Next
--> Working on File::Next
Fetching http://www.cpan.org/authors/id/P/PE/PETDANCE/File-Next-1.16.tar.gz ... OK
Configuring File-Next-1.16 ... OK
Building and testing File-Next-1.16 ... OK
Successfully installed File-Next-1.16
! Installing App::Ack failed. See /root/.cpanm/work/1562605191.55/build.log for details. Retry with --force to force install it.
! Installing the dependencies failed: Module 'App::Ack' is not installed
! Bailing out the installation for ..
Building and testing ack-v3.0.2 ... FAIL
How could I access the build.log that was created by the installation process?
Apparently recently Bitbucket added a feature called "after-script" so I could add the following and that would print the content of the log files.
after-script:
- ls -1 /root/.cpanm/work/*/build.log | xargs cat
or maybe even this:
after-script:
- cat /root/.cpanm/work/*/build.log
and the following, I think, will only show the content of the log files if the build failed:
after-script:
- $BITBUCKET_EXIT_CODE && cat /root/.cpanm/work/*/build.log
Read more here: https://bitbucket.org/blog/after-scripts-now-available-for-bitbucket-pipelines
I have been trying to add a PostgreSQL database to my OpenShift online account to no avail. I am a little confused about how to go about it and I thought I could ask for someone to point me to the right direction.
I have the source cloned from https://github.com/crunchyds/openshift-postgres-cartridge and uploaded to my openshift online repo. I tried running the included scripts - setup, control and the likes but get an error each time.
So I figured this is the wrong way to go about deploying it. Can anyone please explain how to go about it or post a link that would help ?
Here's the error message :
source /usr/lib/openshift/cartridge_sdk/bash/sdk
'[' false == true ']'
OO_BASH_SDK=true
echo /var/lib/openshift/54492b5d4382ec8e52000428//app-deployments
/var/lib/openshift/54492b5d4382ec8e52000428//app-deployments
tar xzf /versions/postgresql94.tar.gz
tar (child): /versions/postgresql94.tar.gz: Cannot open: No such file or
directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
client_result 'Starting PostgreSQL server setup ...'
client_out CLIENT_RESULT 'Starting PostgreSQL server setup ...'
local type=CLIENT_RESULT
local 'output=Starting PostgreSQL server setup ...'
local 'IFS_BAK= '
IFS=''
'[' -z 'Starting PostgreSQL server setup ...' ']'
for line in '$output'
echo 'CLIENT_RESULT: Starting PostgreSQL server setup ...'
CLIENT_RESULT: Starting PostgreSQL server setup ...
IFS=''
mkdir -p /var/lib/openshift/54492b5d4382ec8e52000428/app-
root/data//postgresql/9.4/data
mkdir -p /var/lib/openshift/54492b5d4382ec8e52000428/app-
root/data//postgresql/9.4/data/logs
echo 5432
./setup: line 22: /env/PGPORT: No such file or directory
echo /var/lib/openshift/54492b5d4382ec8e52000428/app-root/data//postgresql/9.4/data
./setup: line 23: /env/PGDATA: No such file or directory
echo /var/lib/openshift/54492b5d4382ec8e52000428/app-root/data//versions/postgresql94/bin
./setup: line 24: /env/OPENSHIFT_POSTGRESQL94_PATH_ELEMENT: No such file or directory
echo /versions/postgresql94/lib
./setup: line 25: /env/OPENSHIFT_POSTGRESQL94_LD_LIBRARY_PATH_ELEMENT: No such file or directory
echo /versions/bin
./setup: line 26: /env/OPENSHIFT_POSTGRESQL94_PATH_ELEMENT: No such file or directory
client_result 'Server setup completed successfully ...'
client_out CLIENT_RESULT 'Server setup completed successfully ...'
local type=CLIENT_RESULT
local 'output=Server setup completed successfully ...'
local 'IFS_BAK= '
IFS=''
'[' -z 'Server setup completed successfully ...' ']'
for line in '$output'
echo 'CLIENT_RESULT: Server setup completed successfully ...'
CLIENT_RESULT: Server setup completed successfully ...
IFS=''
When you add the cartridge you need to pass in the url for the cartridge.
Are you trying to run this in online?
If so I am not sure if this is supposed to work in online so I put in a Github issue for them to clarify.
If it is usable on online then the command to add the cartdidge would be like this command:
rhc cartridge add -a {your app name} http://reflector-getupcloud.getup.io/github/crunchyds/openshift-postgres-cartridge
You need to ensure that the official cartridges on OpenShift Online supports the version of PostgreSQL server. You don't necessary have to setup OpenShift Origin but might help you test your cartridges before using online.
Multiple error messages reference a wrong working directory:
tar: /versions/postgresql94.tar.gz: Cannot open: No such file or directory tar (child):
/env/PGPORT: No such file or directory
/env/PGDATA: No such file or directory
/env/OPENSHIFT_POSTGRESQL94_PATH_ELEMENT
/env/OPENSHIFT_POSTGRESQL94_LD_LIBRARY_PATH_ELEMENT
/env/OPENSHIFT_POSTGRESQL94_PATH_ELEMENT: No such file or directory
Your $OPENSHIFT_PG_DIR seems to be "/" which looks wrong. According to the documentation this variable is built from the shortname in the manifest: OPENSHIFT_{Cartridge-Short-Name}_DIR . Have you changed the short name in the manifest file?
I'm trying to setup nodejs to access a postgres database. What I've done so far is the following (https://gist.github.com/579814):
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl http://npmjs.org/install.sh | sh
then
git clone git://github.com/isaacs/npm.git
make
make install
so far, so good. However, when I try to install the postgres driver
npm install pg
I get the following:
node-waf configure build || true
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr/local
Checking for program pg_config : /usr/bin/pg_config
'configure' finished successfully (0.066s)
Waf: Entering directory `/home/christian/node_modules/pg/build'
[1/2] cxx: src/binding.cc -> build/default/src/binding_1.o
../src/binding.cc:3:25: fatal error: node_events.h: No such file or directory
compilation terminated.
Waf: Leaving directory `/home/christian/node_modules/pg/build'
Build failed: -> task failed (err #1):
{task: cxx binding.cc -> binding_1.o}
I've been looking around for setting the node path, although haven't found anything of help so far - probably also because I'm totally new to nodejs, so I'd be happy about any hint.
Now, you have NodeJS installed in your Ubuntu. You should set /etc/environment and load nodeJS path that can be executed by another users. For example:
NODE="/home/ubuntu/local/node"
NODE_PATH="/usr/local/lib/node_modules"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:$NODE/bin:$NODE/lib/node_modules"
#PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
Do this in bash:
echo 'export NODE_PATH=~/local/:~/local/node_modules' >> ~/.bashrc
before things are fixed you must use node 0.5.1 (you can use gitk to revert the tree to this version)
Auteur: Ryan Dahl <ry#tinyclouds.org> 2011-07-19 10:46:38
Auteur du commit: Ryan Dahl <ry#tinyclouds.org> 2011-07-19 10:46:38
Parent: 0a3fc1d9c8becc32c63ae736ca2b3719a3d03c5b (Remove StatWatcher's dep on C++ EventEmitter)
Enfant: 061ce7b0ac370c8a5ae93d95ab7da171cbd488f0 (net_uv: Fix simple/test-http-expect-continue.js)
Branche: master, remotes/origin/master
Suit: v0.5.1
Précède: v0.5.2
Finally remove node::EventEmitter
I had the same problem.
The issue was that I was specifying a old version of PG in my package.js
After I removed the old version dependancy I was able to install PG without issue.