Could not find json-2.3.0 - bundle-install

when i run metasploit there found some error like that...
[i] Database already started
[i] The database appears to be already configured, skipping initialization
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
Could not find json-2.3.0 in any of the sources
Run bundle install to install missing gems.
i also tried -> bundle install
-> apt-get install json-2.3.0
root#kali:~# bundle install
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:29: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:30: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root
users on this machine.
Could not locate Gemfile
#anyone can help me!!!

Related

Load JAGS to cluster

I would like to install jagsUI on the cluster that I am using. However, this requires me to load JAGS4.3.0 module which I have installed on my computer. This is the error I get when installing jagsUI:
During startup - Warning message:
Setting LC_CTYPE failed, using "C"
* installing *source* package 'rjags' ...
** package 'rjags' successfully unpacked and MD5 sums checked
** using non-staged installation
checking for pkg-config... /usr/bin/pkg-config
configure: WARNING: pkg-config file for jags 4 unavailable
configure: WARNING: Consider adding the directory containing `jags.pc`
configure: WARNING: to the PKG_CONFIG_PATH environment variable
configure: Attempting legacy configuration of rjags
checking for jags... no
configure: error: "automatic detection of JAGS failed. Please use pkg-config to locate the JAGS library. See the INSTALL file for details."
ERROR: configuration failed for package 'rjags'
* removing '/home/cltane002/Rlibs/rjags'
During startup - Warning message:
Setting LC_CTYPE failed, using "C"
ERROR: dependency 'rjags' is not available for package 'jagsUI'
* removing '/home/cltane002/Rlibs/jagsUI'
The downloaded source packages are in
'/tmp/RtmpyIUv3r/downloaded_packages'
Warning messages:
1: In install.packages("jagsUI", "~/Rlibs", "http://ftp.ussg.iu.edu/CRAN") :
installation of package 'rjags' had non-zero exit status
2: In install.packages("jagsUI", "~/Rlibs", "http://ftp.ussg.iu.edu/CRAN") :
installation of package 'jagsUI' had non-zero exit status
I have checked on my terminal whether jags has been installed. The module file for jags is not showing when I do module in the terminal connected to the cluster. I do I load the JAGS software to the cluster?
I would check the documentation page of the hpc cluster. The cluster I used before from my university have already compiled and installed the JAGS module on the cluster. All I needed to do is simply load the module. Usually, the hpc documentation website has a page on what modules are available and also example scripts to load and run them.

Valet-plus : how to install mcrypt with php7.2 or php7.1

Pre-Condition
Magento 2.2.6
Mac Os
Php7.1 or Php7.2
main.CRITICAL: Warning: Use of undefined constant MCRYPT_BLOWFISH -
assumed 'MCRYPT_BLOWFISH' (this will throw an Error in a future
version of PHP) in
/Users/Anant/Desktop/Anant/Projects/cheapsheds/vendor/magento/framework/Encryption/Encryptor.php
on line 397 {"exception":"[object] (Exception(code: 0): Warning: Use
of undefined constant MCRYPT_BLOWFISH - assumed 'MCRYPT_BLOWFISH'
(this will throw an Error in a future version of PHP) in
/Users/Anant/Desktop/Anant/Projects/cheapsheds/vendor/magento/framework/Encryption/Encryptor.php
on line 397 at
/Users/Anant/Desktop/Anant/Projects/cheapsheds/vendor/magento/framework/App/ErrorHandler.php:61)"}
[]
This is coming due to missing mcrypt module in php so, Can you please know me how i installed it using valet plus
To install mcrypt on Valet Plus, run in Terminal:
brew install mcrypt
pecl install mcrypt
Check it has installed with:
php -m | grep mcrypt

module not found: org.scala-sbt#sbt;1.1.6

I installed SBT via terminal with following commands:
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
sudo apt-get update
sudo apt-get install sbt
on my Ubuntu 18.04 and with java version:
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-0ubuntu0.18.04.1-b11)
OpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode)
The installation was successful but when I tried to start SBT via terminal, then I've got
https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/sbt/1.1.6/ivys/ivy.xml
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.scala-sbt#sbt;1.1.6: not found
::::::::::::::::::::::::::::::::::::::::::::::
:::: ERRORS
Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo1.maven.org/maven2/org/scala-sbt/sbt/1.1.6/sbt-1.1.6.pom
Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo1.maven.org/maven2/org/scala-sbt/sbt/1.1.6/sbt-1.1.6.jar
Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo.scala-sbt.org/scalasbt/maven-releases/org/scala-sbt/sbt/1.1.6/sbt-1.1.6.pom
Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo.scala-sbt.org/scalasbt/maven-releases/org/scala-sbt/sbt/1.1.6/sbt-1.1.6.jar
Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo.scala-sbt.org/scalasbt/maven-snapshots/org/scala-sbt/sbt/1.1.6/sbt-1.1.6.pom
Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo.scala-sbt.org/scalasbt/maven-snapshots/org/scala-sbt/sbt/1.1.6/sbt-1.1.6.jar
Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/1.1.6/ivys/ivy.xml
Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/sbt/1.1.6/ivys/ivy.xml
What is wrong?
Update
developer#monad:~$ sudo apt-get purge openjdk-8-jdk java-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
openjdk-11-jre-headless : Depends: ca-certificates-java but it is not going to be installed
Depends: java-common (>= 0.28) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
List of installed java version:
developer#monad:~$ update-java-alternatives --list
java-1.11.0-openjdk-amd64 1101 /usr/lib/jvm/java-1.11.0-openjdk-amd64
java-1.8.0-openjdk-amd64 1081 /usr/lib/jvm/java-1.8.0-openjdk-amd64
Update 2
sudo apt-get install ca-certificates-java
Reading package lists... Done
Building dependency tree
Reading state information... Done
ca-certificates-java is already the newest version (20170930ubuntu1).
ca-certificates-java set to manually installed.
The following packages were automatically installed and are no longer required:
libice-dev libsm-dev libxt-dev
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
The root cause is a conflict between openjdk-11-jdk (which is default in Ubuntu 18.04) and sbt packages settings. It has already been fixed in Debian and will be included in Ubuntu shortly. Meanwhile the simplest workaround is to demote your java to version 8. Other solutions employing ca-certificates-java are much more complicated.
First remove conflicting packages:
sudo apt-get remove --purge openjdk* java-common default-jdk
sudo apt-get remove --purge sbt
sudo apt-get autoremove --purge
Check weather you successfully removed all related packages by:
sudo update-alternatives --config java
The system shall prompt you there is no Java available to config, otherwise this workaround fails.
Then reinstall required packages:
sudo apt-get install openjdk-8-jdk sbt
Test by:
sbt compile
Problem is java-certificates so you need to run these commands:
Reinstall JDK
$ sudo apt-get purge openjdk-8-jdk java-common
$ sudo apt-get install openjdk-8-jdk
Run sbt
$ sbt
I would recommend you install Java/Scala/SBT totally independent from the OS packages. It does not matter (or should not matter!) for a developer which specific version of Java was installed by apt-get, yum or whatever.
From the developer's perspective, it may even make sense to test your application under several versions of Java. I've seen this situation before: "it works" under Java 1.8.x but "it fails" under Java 1.8.y.
So, from a developers, perspective, you would be interested on quickly swithing versions of Java, so that you can quickly make sure it works properly under those several different versions, no matter which specific version is installed on your specific version of the OS.
If you liked the idea, this is how it works:
Download manually all JDK versions you like and uncompress them under a given folder under your home folder, say: $HOME/tools. I have a script which automagically installs a certain version of the JDK for you: https://github.com/frgomes/bash-scripts/blob/master/scripts/user-install/install-java.sh
Adjust environment variables in a virtualenv-like fashion. It's easier than you think and you dont't even need virtualenv. All you need is to source a shell script which runs at login time which defines JAVA_HOME, pointing to a given version of Java, under your $HOME/tools. This is an example: https://github.com/frgomes/bash-scripts/blob/master/bashrc-virtualenvs/j8s12/bin/postactivate
Install Scala and SBT versions by hand, or using my automated script at https://github.com/frgomes/bash-scripts/blob/master/scripts/user-install/install-scala.sh
This fixed it for me.
sudo update-ca-certificates -f
In my case, I solved it by removing .m2, .ivy & .sbt.
Next time I executed sbt, it fixed everything.
I believe I broke sbt when I was playing with the cached dependencies or something else.

Add module nginx psql

I need to add the http_postgres_module module
Here's what I do:
root # fp-desk: /home/floriane/openresty-1.11.2.5# ./configure --with-http_postgres_module;
It compiles some but not completely. I get this error:
ngx_http_form_input_module was configured
adding module in ../encrypted-session-nginx-module-0.06
found ngx_devel_kit for ngx_encrypted_session; looks good.
ngx_http_encrypted_session_module was configured
adding module in ../ngx_postgres-1.0
checking for libpq library version 9.1 ... not found
checking for libpq library version 9.0 ... not found
checking for libpq library version 8.4 ... not found
checking for libpq library version 8.3 ... not found
checking for libpq library version 8.2 ... not found
checking for libpq library version 8.1.4 ... not found
checking for libpq library version 8.1.0 ... not found
checking for libpq library version 8.0.8 ... not found
checking for libpq library version 8.0.0 ... not found
./configure: error: ngx_postgres addon was unable to detect version of the libpq library.
ERROR: failed to run command: sh ./configure --prefix=/usr/local/openresty/nginx ...
root#fp-desk:/home/floriane/openresty-1.11.2.5#
For CentOS or RHEL user, try to install postgresql-devel package.
yum install postgresql-devel
This works for me.

CentOS 7 install Octave 4.0.2 with GUI (OpenGL support)

I'm trying to install Octave 4 from source code in CentOS 7 but I got the warning messages:
configure: WARNING: OpenGL libs (GL and GLU) not found. Native graphics will be disabled.
configure: WARNING: OpenGL libs (GL and GLU) not found -- disabling GUI
configure: WARNING:
configure: WARNING: I didn't find the necessary libraries to compile native
configure: WARNING: graphics. It isn't necessary to have native graphics,
configure: WARNING: but you will need to have gnuplot installed or you won't
configure: WARNING: be able to use any of Octave's plotting commands
configure: WARNING:
configure:
configure: NOTE: Libraries or auxiliary programs may be skipped if they are
configure: NOTE: not found OR if they are missing required features on your
configure: NOTE: system.
I have checked this QUESTION but it didn't help.
I have also done yum install libqt4-opengl-dev but got an error No package libqt4-opengl-dev available.
I have got mesa-libGL and mesa-libGL-devel, but it seems like the configure cannot pick up these libraries.
Edit: answer to my own question
please see comments below the question.
I know that it's an old question, but I wanted to leave it in case if someone is still looking for an easy way of installing Octave 4.x.
The easiest way to install Octave 4 is to use Flatpack. It's installed by default in CentOS 7.
flatpak install flathub org.octave.Octave
flatpak run org.octave.Octave
If you're using Red Hat you need to install flatpak it first:
sudo yum install flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo