error while installing neo4j in ubuntu - neo4j

I have installed ubuntu 16.04 LTS.
I am trying to install neo4j but I am getting the following
W: GPG error: http://debian.neo4j.org/repo stable/ Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 26C95CF201182252
W: The repository 'http://debian.neo4j.org/repo stable/ Release' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Reading package lists... Done
......What to do?

Be sure to follow the documentation: you missed the first step,
wget -O - https://debian.neo4j.org/neotechnology.gpg.key | sudo apt-key add -
Then, re-run sudo apt-get update.

Related

Unable to install jenkins on ubuntu

When i write [sudo apt-get update]
First error : https://pkg.jenkins.io/debian-stable binary/ Packages
server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
Second error : W: The repository 'http://pkg.jenkins.io/debian-stable binary/ Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://pkg.jenkins.io/debian-stable/binary/Packages server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
E: Some index files failed to download. They have been ignored, or old ones used instead.
Try adding a '[trusted=yes]' tag in your /etc/apt/sources.list (or sources.list.d/file) file at the line related to http://pkg.jenkins.io/debian-stable...
At the end, in your souces.list file, you should end up with something like the following:
deb [trusted=yes] http://pkg.jenkins.io/.....
EDIT: this shell command should do the trick:
sed -i 's/^deb /deb [trusted=yes] /' /etc/apt/sources.list
then reload your apt cache with:
apt update
Hope it helps.
Follow Jenkins Debian Packages for all the commands to install Jenkins in Ubuntu.
Install Java
Update your local package index
sudo apt-get install jenkins
I have installed it on Ubuntu 22.04.1 LTS and created a Video Tutorial of it.

Centos image build fails when I use rpms via docker

I'm currently working out a Dockerfile. So I am trying to build out a Centos 7.6 base image and I get a failure when I try to use any yum packages. I'm not sure what the cause of this is.
I've already attempted to make the user root to see if that makes a difference but it doesn't help the situation. I've also done a docker pull centos to recieve the latest version of centos.
I simplified the code and still the same error.
FROM centos
ARG MONGO-RAILS-VERSION="0.0"
RUN yum install vim
# curl -L get.rvm.io | bash -s stable \
# rvm install 2.3.1 \
# rvm use 2.3.1 --default \
# gem install rails
I get an error that looks something like this
One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable <repoid>
or
subscription-manager repos --disable=<repoid>
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
Cannot find a valid baseurl for repo: base/7/x86_64
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=container error was
14: curl#7 - "Failed to connect to 2001:1b48:203::4:10: Network is unreachable"
The command '/bin/sh -c yum install vim' returned a non-zero code: 1
You may want to have a look for Set build-time variables (--build-arg):
$ docker build --build-arg HTTP_PROXY=http://10.20.30.2:1234 --build-arg FTP_PROXY=http://40.50.60.5:4567 .

Docker Debian apt Error Reading from Server

It would seem that apt-get is having issues connecting with the repository servers. I suppose it is likely compatibility issues, as mentioned here, however the proposed solution of apt-get clean does not work for me. Also I am surprised, if this is the case, that there are not more people having my issue.
MWE
Dockerfile
FROM debian:jessie
RUN apt-get clean && apt-get update && apt-get install -y --no-install-recommends \
git
$ docker build .
docker build .
Sending build context to Docker daemon 2.048 kB
Step 0 : FROM debian:jessie
---> 4a5e6db8c069
Step 1 : RUN apt-get clean && apt-get update && apt-get install -y --no-install-recommends git
---> Running in 43b93e93feab
Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
... some omitted ...
Get:6 http://httpredir.debian.org jessie-updates/main amd64 Packages [3614 B]
Fetched 9552 kB in 7s (1346 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
... some omitted ...
0 upgraded, 26 newly installed, 0 to remove and 0 not upgraded.
Need to get 13.2 MB of archives.
After this operation, 64.0 MB of additional disk space will be used.
Get:1 http://security.debian.org/ jessie/updates/main libgnutls-deb0-28 amd64 3.3.8-6+deb8u2 [694 kB]
... some omitted ...
Get:5 http://httpredir.debian.org/debian/ jessie/main libnettle4 amd64 2.7.1-5 [176 kB]
Err http://httpredir.debian.org/debian/ jessie/main libffi6 amd64 3.1-2+b2
Error reading from server. Remote end closed connection [IP: 176.9.184.93 80]
... some omitted ...
Get:25 http://httpredir.debian.org/debian/ jessie/main git amd64 1:2.1.4-2.1 [3624 kB]
Fetched 13.2 MB in 10s (1307 kB/s)
E: Failed to fetch http://httpredir.debian.org/debian/pool/main/libf/libffi/libffi6_3.1-2+b2_amd64.deb Error reading from server. Remote end closed connection [IP: 176.9.184.93 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
The command '/bin/sh -c apt-get clean && apt-get update && apt-get install -y --no-install-recommends git' returned a non-zero code: 100
Please note that I also posted here with a different issue. I believe it to be unrelated, but it may well actually be.
For whoever is having an issue with this, this is my attempt to "fix" the issue by swapping out httpredir with a single working domain whenever the Dockerfile is being built:
FROM debian:je...
# Insert this line before "RUN apt-get update" to dynamically
# replace httpredir.debian.org with a single working domain
# in attempt to "prevent" the "Error reading from server" error.
RUN sed -i "s/httpredir.debian.org/`curl -s -D - http://httpredir.debian.org/demo/debian/ | awk '/^Link:/ { print $2 }' | sed -e 's#<http://\(.*\)/debian/>;#\1#g'`/" /etc/apt/sources.list
# Continue with your apt-get update...
RUN apt-get update...
What this command does is:
Curl the http://httpredir.debian.org/demo/debian/ from the building machine to get the headers from debian demo page (-s is silent, don't output. -D is to dump headers)
Extract the headers, find the Link header fragment. This contains the best route as recommended by httpredir.
The last sed -e ... is to extract out the domain name of the link in step 2.
Then finally, the domain found in step 3 is being feed into the global sed command, and replace the domain httpredir.debian.org found in /etc/apt/sources.list.
This is not a fix, but rather a simple hack to (greatly) reduce the chances of failed build. And... pardon me if it looks weird, as it's my virgin sed & piping attempt.
Edit
On a side note, if the domain that it picks simply too slow or not responding as it should, you may want to do it manually by
Visit http://httpredir.debian.org/demo.html, and you should see a link there like http://......./debian/. For example, at the point of writing, I saw http://mirrors.tuna.tsinghua.edu.cn/debian/
Instead of the long RUN sed -i.... command, use this instead:
RUN sed -i "s/httpredir.debian.org/mirrors.tuna.tsinghua.edu.cn/" /etc/apt/sources.list
I added apt-get clean to my dockerfile before the apt-get update line, it seems to have done the trick.
I guess I have no way of knowing whether or not it was the extra command or if it was luck that fixed my build, but I took the advice from https://github.com/CGAL/cgal-testsuite-dockerfiles/issues/19
The httpredir.debian.org mirror is "magic" in that it will load-balance and geo-ip you to transparent increase performance and availability. I would therefore immediately suspect it of causing your problem, or at least be the first thing to rule out.
I would check if you could:
Still reproduce the problem; httpredir.debian.org will throw out "bad" mirrors from its internal lists so your issue may have been temporary.
Reproduce the problem with a different, non-httpredir.debian.org mirror. Try something like ftp.de.debian.org. If it then works with this mirror, do please contact the httpredir.debian.org maintainer and report the issue to them. They are quite responsive and open to bug reports.
For those visiting with similar issues, using the --no-cache flag in the docker build may help. Similar issues (though not this exact one) can occur if the apt-get update is old and not being recalled sue to caching.
Not enough reputation to comment on previous answers, so I will (confusingly) add a new answer:
I don't think hardcoding a single mirror is really a viable solution, since as for example seen here, there's a reason debian implemented the whole httpredir thing -- mirrors go down or out of date.
I've dealt with this issue a lot of times, and the logs always indicate that docker's actually running the apt-get command, which means --no-cache is unlikely to be fixing it -- it's just that if you rebuild, httpredir is likely to pick a different mirror, even if you don't change anything in your docker file, and the build will work.
I was able to solve this problem by adding -o 'Acquire::Retries=3' to the apt-get install command.
RUN apt-get update && apt-get install -o 'Acquire::Retries=3' -y git
Seems that it automatically retries to acquire the package from another mirror.
apt-get acquire documentation
EDIT: After some investigation I found that my problem was related with the proxy server I was using. I'll leave the answer here anyway in case it helps anyone.

E: Unable to locate package heroku-toolbelt

I am trying to install the Heroku Toolbelt on Linux Mint 15 Olivia (x86-64)
When i try to run the standard command for installing on Debian machines:
wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh
I get:
W: Failed to fetch http://toolbelt.heroku.com/ubuntu/./Packages 302 Moved Temporarily [IP: 23.21.198.2 80]
...
E: Unable to locate package heroku-toolbelt
I have also got the heroku.list repo in my etc/apt/sources/:
deb http://toolbelt.heroku.com/ubuntu ./
When i try to add the repo again with:
sudo apt-add-repository 'deb http://toolbelt.herokuapp.com/ubuntu ./'
I get:
Cannot add PPA: 'No JSON object could be decoded'.
And it seems i'm not the first person with this error on Mint 15 while trying to add repositories.
I suspect this issue may indeed be temporary, but if you need the heroku toolbelt installed now, you can install the standalone client instead of the ubuntu/debian bundle.
wget -qO- https://toolbelt.heroku.com/install.sh | sh
On an Ubuntu-based distro, however, the above will likely throw some errors:
sh: 7: [[: not found
sh: 29: [[: not found
Installation complete
This is because on Ubuntu systems /bin/sh is dash, not bash. You could either get the script and modify it to use bash instead of sh (sh is called within the script, just changing sh to bash in the command above won't suffice), or, you could ignore the errors and just do what the error-ing portion of the script instructs you to do:
Add the Heroku CLI to your PATH using:
echo 'PATH="/usr/local/heroku/bin:$PATH"' >> ~/.profile
You'll need to logout/login again to register the path addition, or just execute heroku directly in the mean time:
/usr/local/heroku/bin/heroku

libmysqlclient.so.15: cannot open shared object file: No such file or directory

All Rails applications are working just fine until today. I am not sure if someone changes the settings on this machine. However does anyone know what could be the fix for this?
Details:
Centos 5.5
Apache
Passenger
Rails 3.0.x
MySql 5.0.77
Error details:
Okay this saves the day.
wget -O /usr/lib64/libmysqlclient.so.15 http://files.directadmin.com/services/es_5.0_64/libmysqlclient.so.15
chmod 755 /usr/lib64/libmysqlclient.so.15
ldconfig
You can try to find the right package by the following command:
$ sudo yum whatprovides libmysqlclient.so.15
libmysqlclient15-5.0.95-5.w5.i386
libmysqlclient15-devel-5.0.95-5.w5.i386
cpanel-mysql-libs-5.0.96-1.cp1136.i386 : The shared libraries required for MySQL clients
then:
$ sudo yum reinstall WHATEVER_THE_PACKAGE_NAME_IS
You may double check the package name by doing yum search package_name.
If not found, you may try to fix your yum repositories e.g. by configuring Webtatic Yum Repository.
To set up the repository, install the webtatic-release RPM:
Webtatic EL6 for CentOS/RHEL 6:
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
Webtatic EL5.1 for CentOS/RHEL 5:
rpm -Uvh http://repo.webtatic.com/yum/el5/latest.rpm
Webtatic 5 for CentOS/RHEL 5:
rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
and repeat the search/reinstall process again.
If you're running cPanel, you may try to run the following script:
/scripts/check_cpanel_rpms --fix
If won't help, remove the broken package e.g. rpm -e cpanel-mysql-5.0.96-1.cp1136 and run the check command again.
If still doesn't work, another thing could be to recompile your Apache (only if your LAMP is broken) by:
/scripts/easyapache

Resources