Building Riak on CentOS from source - riak

I'm trying to build Riak 2.1.3 from source on CentOS 7. The build fails with Uncaught error in rebar_core.
The sequence of steps is the following:
Install Basho version of Erlang with kerl:
$ ./kerl build git git://github.com/basho/otp.git OTP_R16B02_basho8 R16B02-basho8
$ ./kerl install R16B02-basho8 ~/erlang/R16B02-basho8
$ . ~/erlang/R16B02-basho8/activate
Clone Riak git repo and build
$ git clone https://github.com/basho/riak.git
$ cd riak
$ git checkout riak-2.1.3
$ make rel
For this process I'm getting error:
[juriy#dbvm riak]$ make rel
Using rebar.config.lock file to fetch dependencies
./rebar -C rebar.config.lock get-deps
Uncaught error in rebar_core: {'EXIT',
{undef,
[{crypto,start,[],[]},
{rebar,run_aux,2,
[{file,"src/rebar.erl"},{line,212}]},
{rebar,main,1,
[{file,"src/rebar.erl"},{line,58}]},
{escript,run,2,
[{file,"escript.erl"},{line,747}]},
{escript,start,1,
[{file,"escript.erl"},{line,277}]},
{init,start_it,1,[]},
{init,start_em,1,[]}]}}
I also tried to build Erlang from the source, with the same result. Here's the exact list of commands:
wget http://s3.amazonaws.com/downloads.basho.com/erlang/otp_src_R16B02-basho8.tar.gz
tar zxvf otp_src_R16B02-basho8.tar.gz
cd OTP_R16B02_basho8
./otp_build autoconf
./configure && make && sudo make install

Please see my answer to your GitHub issue.

Related

Compiling: conflicting types for 'sigset_t'

I'm trying to compile the wazuh manager. I've done the following:
$ sudo apt-get install gcc make git libc6-dev
$ mkdir ossec_tmp && cd ossec_tmp
$ git clone -b stable https://github.com/wazuh/wazuh.git ossec-wazuh
$ cd ossec-wazuh
$ sudo ./install.sh
This gives me an error as such:
In file included from /usr/include/asm/signal.h:26:0,
from /usr/include/linux/signal.h:5,
from /usr/include/linux/aio_abi.h:32,
from engines/afalg/e_afalg.c:43:
/usr/include/asm-generic/signal.h:92:3: error: conflicting types for 'sigset_t'
} sigset_t;
I then went and tried compiling without shared library only the agent by running:
sudo make -C src DISABLE_SHARED=1 TARGET=agent
This seem to give the exact same error. Anyone able to assist me here to debug?
I can recommend you to follow the manager installation guide of our documentation.
As I can see you want to install the server in a folder called 'ossec_tmp', I recommend you to create the folder and after that following the guide, when you launch
./install
It will ask you for the path where you want to install the service.
Here is a link to the documentation:
https://documentation.wazuh.com/current/installation-guide/installing-wazuh-server/sources_installation.html
Hope it helps.

How to fix the error: No executable found matching command "dotnet-install"

I installed the dotnetcore 2.1.0-preview1-final and running the following command to install the certs.
dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final
But I get the error:
No executable found matching command "dotnet-install"
What should I do to fix this?
Before the release of 2.1.0 SDK - the one that introduce the tool feature - the dotnet install tool command was changed to dotnet tool install.
In fact, the current guideline is that all commands should be of the form:
$ dotnet [context] [action]
So, for example:
$ dotnet tool install
$ dotnet new console
$ dotnet sln add ...
$ dotnet sln remove ...
The only context that is implicit is "project", because of historical reasons. In the future, the following might work:
$ dotnet project restore
$ dotnet project build
See the official guidelines for more information on the current designs of commands.

firebase-tools error: EACCES: permission denied

I am trying to deploy Firebase hosting of my web app.
At the command line, when I type firebase deploy, I get the following error.
Note: firebase deploy is just one example. The same error occurs for all firebase commands. (e.g., firebase --help, firebase -v, firebase login, firebase logout, etc.)
Error
/usr/local/lib/node_modules/firebase-tools/node_modules/configstore/index.js:53
throw err;
^
Error: EACCES: permission denied, open '/Users/mowzer/.config/configstore/update-notifier-firebase-tools.json'
You don't have access to this file.
at Error (native)
at Object.fs.openSync (fs.js:549:18)
at Object.fs.readFileSync (fs.js:397:15)
at Object.create.all.get (/usr/local/lib/node_modules/firebase-tools/node_modules/configstore/index.js:34:26)
at Object.Configstore (/usr/local/lib/node_modules/firebase-tools/node_modules/configstore/index.js:27:44)
at new UpdateNotifier (/usr/local/lib/node_modules/firebase-tools/node_modules/update-notifier/index.js:34:17)
at module.exports (/usr/local/lib/node_modules/firebase-tools/node_modules/update-notifier/index.js:123:23)
at Object. (/usr/local/lib/node_modules/firebase-tools/bin/firebase:5:48)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
Everything I have tried so far (including every CLI firebase instruction) rejects me for lack of access.
What can I do? What should I try?
(I am on a Mac OSX Yosemite v10.10.5 and firebase-tools v3.0.3)
Edit: When I do sudo firebase deploy, I get the following error.
Error: The entered credentials were incorrect.
I tried the following solution.
I tried to delete problem files then reinstall firebase-tools.
Terminal.sh
cd
cd .config/configstore
# Delete problematic files
rm firebase-tools.json
override rw------- root/staff for firebase-tools.json? y
rm update-notifier-firebase-tools.json
override rw------- root/staff for update-notifier-firebase-tools.json? y
# Reinstall firebase-tools
cd
sudo npm install -g firebase-tools
Then...
cd path/to/directory
cd firebase deploy
Now this file generates the error:
/usr/local/lib/node_modules/firebase-tools/node_modules/configstore/index.js:53
cd /usr/local/lib/node_modules/firebase-tools/node_modules/configstore
I fix it by adding sudo at the beginning of the command line!
This looks like an issue with the permissions of modules you have npm installed. This is something lots of developers run into, and npm actually has some documentation on how to resolve it. Once you go through that, try again (you may need to re-install firebase-tools) and things should work.
I had the same issue, and I fixed it by using this command curl -sL firebase.tools | upgrade=true bash
Add sudo prior to command it should work
sudo npm -g i firebase-tools
I had the same issue, and I fixed it by doing chmod 755 on all the files in the configstore directory
Expanding more detail to the solution provided by #jacobawenger:
The most robust solution is to install Homebrew and let Homebrew manage the npm package installation for you.
Terminal.sh
# EACCESS error reference: https://docs.npmjs.com/getting-started/fixing-npm-permissions
# Install Homebrew # Reference: brew.sh # Ensures NPM is installed properly to avoid EACCESS errors
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install npm # Reference: brew.sh
brew install node
# Install firebase-tools
npm install -g firebase-tools # Non-recurring task # Also updates to newest version (see notice)
Easy Way:
Back up your computer.
if you have Permission issue run first this
sudo chown -R $USER /usr/local/lib/node_modules
then 2nd
1)- mkdir ~/.npm-global
2)- npm config set prefix '~/.npm-global'
3)- export PATH=~/.npm-global/bin:$PATH
4)- source ~/.profile
5)- npm install -g jshint
6)- NPM_CONFIG_PREFIX=~/.npm-global
You can try using the --unsafe-perm flag. Just like this:
sudo npm install -g firebase-tools --unsafe-perm
Try run the command as
su root
if you are using ubuntu.
For me, just use sudo, did not work.
I'm using Ubuntu 18.x.x and I was trying install firebase through npm
What worked for me was basically reinstalling the node using the node version manager.
For this, you just install latest node js version this way
In my case at the point of this reply, the LTS Version of the Node JS is v14.17.0 hence nvm use 14.17.0 now try re-running the build.
i faced the same issue recently.
running this command solved the issue for me
sudo chown -R $USER ~/.config/configstore
There's information explaining why the sudo command makes the difference, and generally, when we are calling commands in terminal mode, we are not recognised as the computer's administrator, whereas certain commands are reserved for the administrator only. The sudo command enables terminal commands to be executed as the administrator. You can read about the sudo command here : )
Thank you for your contributions towards resolving this issue.

How to install wkhtmltopdf patched qt without compiling?

I'm using google cloud instance for host Odoo, somo reports print to pdf ok, but other with custom paperformat get the following error:
"The switch --header-spacing, is not support using unpatched qt, and will be ignored.The switch --header-html, is not support using unpatched qt, and will be ignored.The switch --footer-html, is not support using unpatched qt, and will be ignored.QXcbConnection: Could not connect to display"
I google it, and to solve I need to compile wkhtmltopdf like this:
http://www.grobak.net/id/blog/how-fix-wkhtmltopdf-failed-error-code-6 but this proccess need 3 hs and I'm building a script to install google instances on the run with odoo dependencies.
the .deb package have a dependency broken
Anyone know other solution?
My system configuration is Ubuntu 14.04 and 64 bit. So, i am downloading according to that.
First you have to check your system OS name by
lsb_release -a
Check to see if your Ubuntu Linux operating system architecture is 32-bit or 64-bit, open up a terminal and run the following command below.
file /sbin/init
Download wkhtmltopdf patched with qt using below command
sudo wget -P Downloads https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb
Here, replace "trusty" with your OS name and if 64 bit only then keep "amd64" like that , otherwise change it to "i386" and down load the deb file.
After that execute the following commands,
cd ~/Downloads
sudo dpkg -i wkhtmltox-0.12.1_linux-trusty-amd64.deb
Now, check wkhtmltopdf version with below command,
wkhtmltopdf -V
Enjoy!!
After trying many ways I finally made it work.
First I removed all my previous installation by
sudo apt-get remove --purge wkhtmltopdf
sudo apt-get autoremove
Then I opened wkhtmltopdf.org and navigated into their Downloads > Archive. In Archive section I downloaded 0.12.1 .deb version by
wget <copy the link from website for the.deb file and paste it in terminal here>.
sudo dpkg -i <package name>
sudo cp /usr/local/bin/wkhtmltopdf /usr/bin
This is because odoo looks for wkhtmltopdf in /usr/bin directory otherwise gives IOError. I also set my webkit_path parameter in Odoo System Parameters to /usr/bin.
Thats it. Hope this helps
I was facing same issue with wkhtmltopdf 0.12.4
installed new version of wkhtmltopdf 0.12.6-1
follow below commands to install wkhtmltopdf 0.12.6-1
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.centos7.x86_64.rpm
yum localinstall wkhtmltox-0.12.6-1.centos7.x86_64.rpm #centos specific command

Installing PHPUnit on MAMP 2.1.3 (Mountain Lion)

I'm struggling with this issue.
Here's what I've tried :
$ cd /Applications/MAMP/bin/php/php5.4.10/bin/
$ sudo ./pear channel-update pear.php.net
$ sudo ./pear upgrade pear
$ sudo /Applications/MAMP/bin/php/php5.4.10/bin/pear channel-discover pear.phpunit.de
$ sudo /Applications/MAMP/bin/php/php5.4.10/bin/pear channel-discover pear.symfony-project.com
$ sudo /Applications/MAMP/bin/php/php5.4.10/bin/pear install phpunit/PHPUnit
So it seems to work, but phpunit is actually installed in
/Applications/MAMP/bin/php3/bin/
If I tried to launch it from there, it doesn't work (no output, no log). If I move it to the php 5.4.10 folder, it still doesn't work.
I've replaced the Mac OS php cli with MAMP's :
$ which php
/Applications/MAMP/bin/php/php5.4.10/bin/php
As suggested on some website, I've also tried to remove
/Applications/MAMP/bin/php/php5.4.10/conf/pear.conf
But nothing seems to help.
Any idea ?
I'd recommend using composer. It's becoming a standard.
To start with, go to your project's root directory first and create a composer.json file there:
{
"require-dev": {
"phpunit/phpunit": "*"
},
"autoload": {
"psr-0": {"": "src"}
},
"config": {
"bin-dir": "bin"
}
}
You can tune it to your needs later. You'll probably want to configure the autoloading if you'd like to leverage composer's autoloader (which I recomend).
Next download the composer:
curl -sS https://getcomposer.org/installer | php
The above script will not only download it but also verify your environment if it's suitable to run composer binary.
If everything goes well install your dependencies:
./composer.phar install --dev
PHPUnit binary will be installed in the bin directory (configured in composer.json):
./bin/phpunit --version
I've met this problem this morning and find this topic but no answer is helpful. After a couple of hours google search, I found this link, it helped me solve my problem
http://www.startupcto.com/server-tech/macosx/installing-phpunit-on-mamp
My MAMP php version is 5.5.3
First, you'll probably need to update PEAR:
sudo /Applications/MAMP/bin/php/php5.5.3/bin/pear channel-update pear.php.net
sudo /Applications/MAMP/bin/php/php5.5.3/bin/pear upgrade pear
After that, add the appropriate PEAR channels for PHPUnit:
sudo /Applications/MAMP/bin/php/php5.5.3/bin/pear channel-discover pear.phpunit.de
sudo /Applications/MAMP/bin/php/php5.5.3/bin/pear channel-discover pear.symfony.com
sudo /Applications/MAMP/bin/php/php5.5.3/bin/pear channel-discover components.ez.no
Finally, install PHPUnit:
sudo /Applications/MAMP/bin/php/php5.5.3/bin/pear install phpunit/PHPUnit
Test phpunit to make sure it was installed correctly:
/Applications/MAMP/bin/php/php5.5.3/bin/phpunit --version
Link phpunit to your path
sudo ln -s /Applications/MAMP/bin/php/php5.5.3/bin/phpunit /usr/local/bin/phpunit
Hope this help you and anyone meet this problem in the future!
You could try this solution from this site
The php bin could vary from installation.
/Applications/MAMP/bin/php5/bin/pear channel-discover pear.phpunit.de
/Applications/MAMP/bin/php5/bin/pear channel-discover pear.symfony-project.com
/Applications/MAMP/bin/php5/bin/pear channel-discover components.ez.no
/Applications/MAMP/bin/php5/bin/pear install phpunit/PHPUnit

Resources