Failed to initialize central HHBC repository: Failed to initialize schema - composer-php

The complete error is:
Failed to initialize central HHBC repository:
Failed to initialize schema in /home/shreeram/.hhvm.hhbc:
I am trying to configure hhvm ana apache2.
For that i am following this link how-to-setup-hhvm-on-ubuntu-14-04-server-with-apache-2-4-part-1/
In above link i am stuck in the step when i put this command in the terminal:
curl -sS https://getcomposer.org/installer | php
The result of that command is the error mentioned above.
The shreeram directory has both read and write permission.
Could anyone help me to understand what i am missing there?

Are you sure permissions are correct on /home/shreeram, and that /home/shreeram/.hhvm.hhbc is readable and writable by the user running php? This issue really does sound like a permissions problem.
As the same user that was running php, does touch /home/shreeram/.hhvm.hhbc work? What about echo > /home/shreeram/.hhvm.hhbc?
If that's all fine, try rm /home/shreeram/.hhvm.hhbc and then try to install Composer again. Although it's typically a permission error, there are cases when the repo can become corrupt (particularly if the enclosing directory is on NFS or some other network filesystem) and you can just remove it and start over.

Related

AWS Beanstalk Laravel post deploy hooks no such file or directory

I'm trying to deploy laravel app to aws beanstalk, OS is Amazon Linux 2 AMI.
I've setup following files:
.ebextensions/01-deploy-script-permission.config
It contains below code:
container_commands:
01-storage-link:
command: 'sudo chmod +x .platform/hooks/postdeploy/post-deploy.sh'
And
.platform\hooks\postdeploy/01-post-deploy.sh
It contains below code:
php artisan optimize:clear
Upon deploying it fails with following entry in eb-engine.log file
[ERROR] An error occurred during execution of command [app-deploy] -
[RunAppDeployPostDeployHooks]. Stop running the command. Error:
Command .platform/hooks/postdeploy/post-deploy.sh failed with error
fork/exec .platform/hooks/postdeploy/post-deploy.sh: no such file or
directory
This answer is for users who are using Windows to deploy their files to elastic beanstalk.
I found this information after spending 6 precious hours. Probably not documented anywhere in official documentations
As per this link "https://forums.aws.amazon.com/thread.jspa?threadID=321653"
psss: most important that the file is saved with LF line separator.
CRLF makes "no file or directory found"
So I used Visual Studio Code to convert CRLF to LF for files in .platform/hooks/postdeploy
At the bottom right of the screen in VS Code there is a little button
that says “LF” or “CRLF”: Click that button and change it to your
preference.
I don't know for sure but I think you are running the command before the files are even created hence getting the following error.
A while ago I faced the same kind of problem where I wrote migration commands in .ebextension and it used to give me an error because my env file wasn't even created yet hence no DB connection is made so I was getting the error. Hope this will give you a direction.
By the way, I resolved the problem by creating env then pushing these commands through the pipeline.

Unable to pull hyperledger/cello-api-engine image

Setup of Hyperledger-cello:
Cloned Hyperledger-cello 0.9.0
sudo SERVER_PUBLIC_IP=xx.xx.xx.xx make start
I am facing the following issue:
ERROR: pull access denied for hyperledger/cello-api-engine, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
Makefile:211: recipe for target 'start-docker-compose' failed
I tried changing name of image in docker-compose.yml file, but stuck with the same issue.
ERROR: The image for the service you're trying to recreate has been removed. If you continue, volume data could be lost. Consider backing up your data before continuing.
Continue with the new image? [yN]n
ERROR: pull access denied for hyperledger/cello-api-engine, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
Makefile:211: recipe for target 'start-docker-compose' failed
make[1]: *** [start-docker-compose] Error 1
Hey the problem is that on master is not the most stable release, so, in orderer it to work they have changed a little bit. After cloning you need to do the following.
make docker
This will build all the images, on the documentation they say that for now this is mandatory.
And after that is finished do the following:
make start
This will start the network.
If you are looking for a more stable build you can checkout to the tag 0.9.0.
Take on account that this project is still on incubator and they are preparing for the 1.0.0 release, on the master branch you may see that there is missing documentation and more.
There is no cello-api-engine in docker hub.
You can check list here
cello docker hub
If you change from cello-api-engine to cello-engine, that error will not appear. But there is also no cello-dashboard in docker hub images for next step. there are only cello-operator-dashboard and cello-user-dashboard.
No need to change any image name in .yaml files,after running setp-master, it is going to create images in your mahcine . Done with images part.
If anyone face issue let me knwow :)

Unable to modify permissions of folders on Mac (Mojave)

I am new to Macs and I am trying to run some interesting stats on my iMessages using the code runner extension on VSCode. I've been following this post: https://towardsdatascience.com/heres-how-you-can-access-your-entire-imessage-history-on-your-mac-f8878276c6e9
However, when I run the line conn = sqlite3.connect('/Users/<username>/Library/Messages/chat.db')
I get the error sqlite3.OperationalError: unable to open database file
Based off what I can tell my issue is that VScode doesn't have the right permissions to access the ~/Library/Messages folder and possibly the chat.db as well. First, I ran ls -l on Library and the result is drwx---rwx for Messages. So I tried to use both chmod a+rwx Messages and sudo chmod a+rwx Messages to open permissions to everything but got the error chmod: Unable to change file mode on Messages: Operation not permitted both times.
Am I doing something wrong and/or is there a better way to do this? Or is it just not possible to change the permissions of this folder?
After some more creative searching I discovered that it was an Issue with Mojave's System Integrity Protection (SIP) and can be solved by giving the desired apps full disk access in Settings>Security&Privacy>Privacy>FullDiskAccess.
Solution found here

Process killed when running npm install during file generation step of production guide (Canvas LMS)

I am trying to set up a canvas lms on an amazon ec2 Ubuntu environment. I've gone so far until the file generation step of the production environment guide. I've been able to successfully follow the steps until this point.
Steps to reproduce:
I was successful in making the asset directories and taking their ownership as directed in this step:
sysadmin#appserver:~$ cd /var/canvas
sysadmin#appserver:/var/canvas$ mkdir -p log tmp/pids public/assets public/stylesheets/compiled
sysadmin#appserver:/var/canvas$ touch Gemfile.lock
sysadmin#appserver:/var/canvas$ sudo chown -R canvasuser config/environment.rb log tmp public/assets \ public/stylesheets/compiled Gemfile.lock config.ru`
After this, I run 'npm install'
It is at this point that after getting some deprecated warnings I get stuck at this line:
canvas-lms#0.0.0 preinstall /home/ubuntu/canvas/script/gem_npm install
running npm install for gems/canvas_i18nliner/package.json
running npm install for gems/selinimum/package.json
Killed [ ..] / extract:lodash: sill gunzTarPerm modified mode [ 'fp/getOr.js', 420, 436 ]'
What I've already tried:
First I thought it was an error with the port 9418/tcp not being open. I opened this port through amazon ec2 security group inbound rules. This did not work. Then I tried opening all the ports 1-65000 to fix this. It still did not work.
Additional notes:
From the looks of it, it does not looks like a port issue because the script is able to fetch data in the previous steps. Also from the progress bar it can be seen that the extract is failing only when the last 2 dots are left as the progress bar is shows like this: [ ..]. I'm guessing this is a .js creation erorr.
The documentation provides a link to fix those issues but the description of the steps to follow are not very elaborate there as I can't understand what exactly i need to do. Can someone please look into this and help me? Any help is much appreciated.
The File Generation section in the production guide says to follow this link to fix .js creation issues. The solution I found in this link was to add the following code to the compile_template function found in lib/handlebars/handlebars.rb file. The directory lib/handlebars does not exist in /lib
def compile_template(source, id, plugin=nil)
require 'execjs'
require 'multi_json'
P.S. I downloaded my installation directly from the git repository so no chance of this being missing for some reason :/

Grails create-app error

Anyone know why I would get this error when trying to create a grails app using terminal.
mycomputer:test-apps mailboxe$ grails create-app demo
| Configuring classpath
| Error Error executing script CreateApp: /Users/bla/.grails/ivy-cache/resolved-org.grails.internal-grails-2.0.3.xml (Permission denied) (Use --stacktrace to see the full trace)
As #Phillip Tenn mentions, this is a permissions issue. Chances are something got installed into a cache with the sudo command so the root user owns the file and your normal user can't modify it.
The easiest thing to do is probably to just whack your ~/.grails directory, by default, there isn't anything but cached information in there. So unless you've put something in there manually (like a config file), it's safe to delete and let it regenerate with the next grails command. To do that, just:
cd ~
sudo rm -r .grails
It'll prompt you for your password to ensure you want to run this command as the root user.
Alternatively, you could try to find the offending file and chown it to your user and group (by default on OSX the group is staff). So for this example:
sudo chown bla:staff /Users/bla/.grails/ivy-cache/resolved-org.grails.internal-grails-2.0.3.xml
Grails needs to be able to write to a .grails folder under your user directory.
Without knowing the details of your development environment, the error message you are getting says (Permission denied) when you try to run grails create-app demo.
I would look into your directories:
/Users/bla/.grails/
/Users/bla/.grails/ivy-cache/
and ensure that you have proper write permissions.

Resources