Installing Homebrew on Linux: Debian, Ubuntu, and RedHat

how to install homebrew on Linux

Homebrew has become pretty much the standard on macOS, but these days you can install Homebrew on Linux too. On Debian and RedHat you can manage packages with apt or dnf (yum), but Homebrew makes it easier to install and update programs that are not in those packages and are not published as a repository. For example, tools I use often such as Hugo, Docker’s docker-compose, and lazydocker have to be downloaded from the official site and swapped out every time there is an update, but this can now be simplified to something like brew update hugo, just as on macOS. [Read More]

CentOS 7 Stuck at the dracut Emergency Prompt and Would Not Boot

centos7 dracut initqueue timeout and could not boot

At some point, somewhere around when I updated the CentOS7 kernel, it stopped booting properly. When it boots, it gets stuck showing this screen and goes no further Copy Wrning: /dev/centos_web/root does not exist Warning: /dev/mapper/centos_web-root does not exist Generating "/run/initramfs/sosreport.txt" Entering emergency mode. Exit the shell to continue. Type "journalctl" to view system logs. You might want to save "/run/initramfs/sosreport.txt" to a USB stick or /boot after mounting them and attach it to a bug report. dracut:/# I figured that something grub-related had probably broken or been misconfigured when the kernel was updated, so I googled it [Read More]

Installing Zsh 5.9 from Source on CentOS 7 and 8

zsh 5.9 manual install on CentOS

zsh5.9 is the latest right now, so I have updated this article The zsh on CentOS7/8 is old, so I installed the latest version at this point, 5.9, by hand Preparation Since we use commands such as wget and make, install the developer tools first Copy $ export LANG=C $ sudo yum groupinstall "Development Tools" $ sudo yum install ncurses-devel Downloading and installing /usr/bin/zsh and /bin/zsh already exist, so install into /usr/local [Read More]

Overriding the LDAP Login Shell on Debian and CentOS Clients

override LDAP login shell

There are cases where, on a particular LDAP client machine, you want to use a different shell rather than the one defined on the LDAP server (bash) This is possible by configuring the Linux (Debian/CentOS) client to override the shell Debian11(bullseye) Add the following to /etc/libnss-ldap.conf (look up the path to the shell beforehand) Copy nss_override_attribute_value loginShell /usr/bin/zsh Flush the nscd cache Copy # nscd -i passwd nscd CentOS8 Add the following to /etc/nslcd.conf [Read More]

Fixing Hugo Source Build Errors on CentOS 7

Working around the errors that appear when building hugo from source

I posted a similar article before in GCC error with hugo on CentOS7 , but recently the build from source failed, so I worked on it. Incidentally, the version of hugo I am trying to build is 0.82 Environment Copy # cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) # git version git version 1.8.3.1 # go version go version go1.15.5 linux/amd64 Building hugo from source Copy $ vim from-gh.sh mkdir $HOME/src cd $HOME/src git clone https://github.com/gohugoio/hugo.git cd hugo go install --tags extended $ sh from-gh.sh Error Copy Cloning into 'hugo'... remote: Enumerating objects: 50309, done. remote: Total 50309 (delta 0), reused 0 (delta 0), pack-reused 50309 Receiving objects: 100% (50309/50309), 93.65 MiB | 9.80 MiB/s, done. Resolving deltas: 100% (34542/34542), done. go: github.com/sanity-io/[email protected] requires github.com/pmezard/[email protected]: invalid version: git fetch --unshallow -f origin in /root/go/pkg/mod/cache/vcs/b66720d7c9f6776b1690ab6c7de6bd08fe64d74a3eaff8dbdef6603dac225370: exit status 128: fatal: git fetch-pack: expected shallow list When I updated git to the latest version, this time I got the error below [Read More]

Why remi-php Updates Fail with yum on CentOS 7

Repository priority with enablerepo on a yum update

Once again, an error caused by dependencies during a CentOS yum update The situation On CentOS7, php7.x has already been installed from the remi repository The symptom An error during yum update Copy # sudo yum update —enablerepo=remi-php73 エラー: パッケージ: php-pecl-zip-1.18.2-1.el7.remi.5.4.x86_64 (remi) 要求: php(zend-abi) = 20100525-64 インストール: php-common-7.3.0-1.el7.remi.x86_64 (@remi-php73) php(zend-abi) = 20180731-64 利用可能: php-common-5.4.16-48.el7.x86_64 (base) php(zend-abi) = 20100525-64 利用可能: php-common-5.4.45-18.el7.remi.x86_64 (remi) php(zend-abi) = 20100525-64 エラー: パッケージ: php-pecl-zip-1.18.2-1.el7.remi.5.4.x86_64 (remi) 要求: php(api) = 20100412-64 インストール: php-common-7.3.0-1.el7.remi.x86_64 (@remi-php73) php(api) = 20180731-64 利用可能: php-common-5.4.16-48.el7.x86_64 (base) php(api) = 20100412-64 利用可能: php-common-5.4.45-18.el7.remi.x86_64 (remi) php(api) = 20100412-64 問題を回避するために --skip-broken を用いることができます。 Using --skip-broken does not work either [Read More]

GCC Error Keeps Hugo from Starting on CentOS 7

hugo does not start because of a gcc error

When I installed the latest version of Hugo on CentOS7, it would no longer start because of the error below ./hugo version ./hugo: /lib64/libstdc++.so.6: version GLIBCXX_3.4.20' not found (required by ./hugo) ./hugo: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21’ not found (required by ./hugo) Checking the GCC version Copy # strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX GLIBCXX_3.4 GLIBCXX_3.4.1 GLIBCXX_3.4.2 GLIBCXX_3.4.3 GLIBCXX_3.4.4 GLIBCXX_3.4.5 GLIBCXX_3.4.6 GLIBCXX_3.4.7 GLIBCXX_3.4.8 GLIBCXX_3.4.9 GLIBCXX_3.4.10 GLIBCXX_3.4.11 GLIBCXX_3.4.12 GLIBCXX_3.4.13 GLIBCXX_3.4.14 GLIBCXX_3.4.15 GLIBCXX_3.4.16 GLIBCXX_3.4.17 GLIBCXX_3.4.18 GLIBCXX_3.4.19 It looks like the GCC version on CentOS is still old [Read More]

Installing Ripgrep on Mac, CentOS and Debian

Installing ripgrep

Notes from installing Ripgrep(rg), which searches faster than grep, ack and silver_searcher, on several platforms Mac Install it straight from homebrew (if homebrew is already installed) Copy $ brew install ripgrep CentOS 7 On CentOS, ripgrep is not in the standard repositories or in epel, so install it as follows Copy $ sudo yum-config-manager --add-repo=https://copr.fedorainfracloud.org/coprs/carlwgeorge/ripgrep/repo/epel-7/carlwgeorge-ripgrep-epel-7.repo $ sudo yum install ripgrep Debian 10 Copy # apt install ripgrep If your version of Debian9 or Ubuntu is old and the package is not in apt, use the following [Read More]