Homebrew installation failed - homebrew

I was trying to install Homebrew today on my freshly setup Linux ubuntu. I installed curl and git as usual but when trying to install Homebrew, I got this in my Terminal:
david#david-ThinkPad-T460p:~$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
==> Checking for `sudo` access (which may request your password)...
==> This script will install:
/home/linuxbrew/.linuxbrew/bin/brew
/home/linuxbrew/.linuxbrew/share/doc/homebrew
/home/linuxbrew/.linuxbrew/share/man/man1/brew.1
/home/linuxbrew/.linuxbrew/share/zsh/site-functions/_brew
/home/linuxbrew/.linuxbrew/etc/bash_completion.d/brew
/home/linuxbrew/.linuxbrew/Homebrew
==> HOMEBREW_BREW_GIT_REMOTE is set to a non-default URL:
... will be used as the Homebrew/brew Git remote.
==> HOMEBREW_CORE_GIT_REMOTE is set to a non-default URL:
... will be used as the Homebrew/homebrew-core Git remote.
Press RETURN/ENTER to continue or any other key to abort:
==> /usr/bin/sudo /bin/chown -R david:david /home/linuxbrew/.linuxbrew/Homebrew
==> Downloading and installing Homebrew...
fatal: '...' does not appear to be a git repository
fatal: Konnte nicht vom Remote-Repository lesen.
Bitte stellen Sie sicher, dass die korrekten Zugriffsberechtigungen bestehen
und das Repository existiert.
Failed during: git fetch --force origin
Can anybody help me with that, as I'm pretty new to the subject and working with Linux at all?

Run
unset HOMEBREW_BREW_GIT_REMOTE HOMEBREW_CORE_GIT_REMOTE
Then run the installer again

Related

how to download brew resource manually and install?

My internet has interference so brew installation procedure may failure sometimes.
==> Downloading https://github.com/openjdk/jdk/commit/f80a6066e45c3d53a61715abfe71abc3b2e162a1.patch?full_index=1
######################################################################## 100.0%
==> Downloading https://github.com/openjdk/jdk/commit/4622a18a72c30c4fc72c166bee7de42903e1d036.patch?full_index=1
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
Error: Failed to download resource "openjdk--patch"
Download failed: https://github.com/openjdk/jdk/commit/4622a18a72c30c4fc72c166bee7de42903e1d036.patch?full_index=1
I manage to got that file, but I don't known the correct filename for brew.
brew --cache openjdk--patch
Error: No available formula or cask with the name "openjdk--patch".
brew --cache -s openjdk
~/Library/Caches/Homebrew/downloads/336948b1d9a8eba79fadf26569f4af0cb2fe147fde214fc9d9bf6b66f2f927d2--jdk15u-jdk-15.0.1-ga.tar.bz2
So how to got the correct filename for this patch?
I found the tricky, just run
brew install package-name -d
it will print each cache name of resources used by package-name

How To fix Can't update or upgrade Homebrew

How To fix Can't update or upgrade Homebrew
I can no longer run either brew upgrade or brew update: both abort with
Error: homebrew-core is a shallow clone. To `brew update` first run:
git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" fetch --unshallow
and if I follow this suggestion and run git ... --unshallow
and if I follow this suggestion and run git ... --unshallow and then try brew update or brew upgrade I still get the same error message.
If I then try the command again (maybe I didn't do it right the first time?) I get
fatal: --unshallow on a complete repository does not make sens`e
How do I get past this error message to run brew upgrade or brew update without errors?
HOMEBREW_VERSION: 2.6.0-82-gde1afcb
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: de1afcbfc58fb3cd5779bd8fbb6b9995700dda4c
Last commit: 30 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: a7c63b0f7f7ae416a2f961b263155281759ac3a7
Core tap last commit: 29 hours ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.FwPJPzeLfq/org.macosforge.xquartz:0
HOMEBREW_EDITOR: /usr/local/bin/bbedit
HOMEBREW_MAKE_JOBS: 4
HOMEBREW_NO_ANALYTICS: set
HOMEBREW_NO_EMOJI: set
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: quad-core 64-bit haswell
Clang: 12.0 build 1200
Git: 2.29.2 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 1.8.0_172
macOS: 10.15.7-x86_64
CLT: 12.0.32.27
Xcode: 12.2
XQuartz: 2.7.11 => /opt/X11
Please Help me i was tired Thanks!
Basically if you see the following error then run what is suggesting you, but could take some time maybe between 5 and 10 minutes depending on how fast is your system:
Error:
homebrew-core is a shallow clone.
homebrew-cask is a shallow clone.
To `brew update`, first run:
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow
I hope that answered your question to you or someone else, good luck.

I am trying to install docker on centos8 vagrantbox facing the error 'Downloading successful, but checksum doesn't match'

[MIRROR] containerd.io-1.2.0-3.el7.x86_64.rpm: Downloading successful, but checksum doesn't match. Calculated: ece851b2b2defa24eb3b817b14d97f31f4043a713d7367972bd2c1ef4f2788b8(sha256) Expected: 7bd1d8da7d896ead55fdea3a42100eac4c4d7800f958d3ae056d40268dec4636(sha256)
(8/21): python3-policycoreutils-2.9-9.el8.noarch.rpm 107 kB/s | 2.2 MB 00:21
[MIRROR] containerd.io-1.2.0-3.el7.x86_64.rpm: Downloading successful, but checksum doesn't match. Calculated: 3928fc6c58817b02602a249e512d7e99b7c3fe06ea5d9ff3ad46e25984ff8141(sha256) Expected: 7bd1d8da7d896ead55fdea3a42100eac4c4d7800f958d3ae056d40268dec4636(sha256)
[MIRROR] docker-ce-18.09.1-3.el7.x86_64.rpm: Downloading successful, but checksum doesn't match. Calculated: 3ddabd445a05b85aeba128da42283d3285ca8055e6a201139ee49b682942ba43(sha256) Expected: 6034f83c3bf3d5d31120ef36b3172dbb28d1ac8ae3699ed8cb33924dcef0d17a(sha256)
[MIRROR] containerd.io-1.2.0-3.el7.x86_64.rpm: Downloading successful, but checksum doesn't match. Calculated: 3914815a5c9756672d6f046929335ddff86607c29ac8a3c3fc12452a69952bf7(sha256) Expected: 7bd1d8da7d896ead55fdea3a42100eac4c4d7800f958d3ae056d40268dec4636(sha256)
[FAILED] containerd.io-1.2.0-3.el7.x86_64.rpm: No more mirrors to try - All mirrors were already tried without success
(10-11/21): docker-ce-18.09.1-3.el7.x86_64.rpm 50% [============================================== ] 1.4 MB/s | 50 MB 00:35 ETA
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'yum clean packages'.
Error: Error downloading packages:
Cannot download Packages/containerd.io-1.2.0-3.el7.x86_64.rpm: All mirrors were tried
Error: Transaction test error: package selinux-policy-targeted-3.14.3-41.el8_2.5.noarch does not verify: Header SHA1 digest: BAD (Expected ab8b3fe6b75faa65c89e64ec34986ee49924f982 != 3716bcc257255e43bc9ace1b9c4aecb6fcba3e61) package python3-policycoreutils-2.9-9.el8.noarch does not verify: Header SHA1 digest: BAD (Expected af32d12b99154706740619e0ac39289c009f1aa9 != faa84ee41c25523f2a05358d172f124370c18f99) package containerd.io-1.2.6-3.3.el7.x86_64 does not verify: no digest
''' Please help me to install docker on centos8 to fix this issue SHA1 digest: BAD '''
Try installing packages containerd manually:
yum clean packages #clean packages from failed install
dnf install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm #install newest containerd manually
sudo yum install docker-ce docker-ce-cli #install Docker daemon and CLI
Links:
Install Docker on CentOS
Docker documentation for installation
on CentOS
Docker CentOS repository

how can i make an pgAudit installation for my PostgreSQL10?

I wanted to install pgAudit on my CentOS 6 32-bit, I already installed PostgreSQL 10 + pgAdmin4 from PostgreSQL Linux run installer that I downloaded from DBEnterprise
I followed the guide from here, here are the steps I followed :
git clone https://github.com/postgres/postgres.git
go into the folder by cd postgres and then git checkout REL_10_STABLE
./configure after that make install -s
cd contrib
Clone the pgAudit extension by git clone https://github.com/pgaudit/pgaudit.git
cd pgaudit
git checkout REL_10_STABLE
make -s check
make install
I'm stuck at step 8. Here's the result :
[root#localhost pgaudit]# make -s check
============== creating temporary instance ==============
============== initializing database system ==============
pg_regress: initdb failed
Examine /root/postgres/contrib/pgaudit/log/initdb.log for the reason.
Command was: "initdb" -D "/root/postgres/contrib/pgaudit/./tmp_check/data" --no-clean --no-sync > "/root/postgres/contrib/pgaudit/log/initdb.log" 2>&1
make: *** [check] Error 2
I opened the initdb.log at /root/postgres/contrib/pgaudit/log/initdb.log like how it told me to, and it says :
Running in no-clean mode. Mistakes will not be cleaned up.
initdb: cannot be run as root
Please log in (using, e.g., "su") as the (unprivileged) user that will
own the server process.
So I tried it again after I logged in as postgres, here's the result :
bash-4.1$ make -s check
make[3]: stat: ../../src/include/utils/errcodes.h: Permission denied
/bin/sh: line 0: cd: utils/: Not a directory
make[3]: *** [../../src/include/utils/errcodes.h] Error 1
make[2]: *** [submake-errcodes] Error 2
make[1]: *** [submake-libpgport] Error 2
make: *** [submake] Error 2
I'm really new to both Linux and PostgreSQL, so I don't know why it failed and what is the solution for this. Thanks in advance!
Look like your db user not having a login shell.
You can try with:
sudo -u postgres psql template
Or:
sudo -u postgres bash

fabric-composer quick-start failed on ubuntu 16.04

I'm trying to follow the Fabric Composer Quickstart but failed.
Could you give me hints?
When I tried "sudo npm install", the script was completed with a few warnings.
npm WARN lifecycle getting-started#1.0.0~preinstall: cannot run in wd %s %s (wd=%s) getting-started#1.0.0 composer --version || echo 'Please first run npm install -g composer-cli' /<directory>/sample-applications/packages/getting-started
npm WARN lifecycle getting-started#1.0.0~install: cannot run in wd %s %s (wd=%s) getting-started#1.0.0 scripts/download-hyperledger.sh && scripts/start-hyperledger.sh && npm run deployNetwork /<directory>/sample-applications/packages/getting-started
When I tried "sudo composer network list -n digitalproperty-network --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d",
List business network digitalproperty-network
2017-03-21T22:44:47.360Z ERROR FSConnectionProfileStore :load() Failed to loaded connection profile defaultProfile {"0":{"stack":["{Error}ENOENT: no such file or directory, open '<directory>.composer-connection-profiles/defaultProfile/connection.json' Error: ENOENT: no such file or directory, open '<directory>.composer-connection-profiles/defaultProfile/connection.json'"," at Error (native)"]}}$
Failed to load connection profile defaultProfile
Command completed successfully.
I use
Ubuntu: 16.04
docker: 1.13.1
docker-compose: 1.11.2
node: v6.10.0
npm: 4.4.4
git: 2.11.0
composer:
composer-cli v0.5.5
composer-admin v0.5.5
composer-client v0.5.5
composer-common v0.5.5
composer-runtime-hlf v0.5.5
composer-connector-hlf v0.5.5
It looks like I have .composer-connection-profiles/defaultProfile/ direcotry but the directory don't have connection.js
How can we solve the problem? can i prepare connection.js manually?
Thank you!
This problem occurs when you run the npm install using sudo.
it shouldn't be necessary to run the commands as root so try again without using sudo and see if that helps.
This solves the problem npm install composer-connector-hlf

Resources