Common error messages, along with their solutions.
Saves me having to figure the same thing out twice.
Categories
Linux
β Error running a shell script with systemd: Failed to execute command: Exec format error
β
Solution:
- Caused by missing shebang at the start of the sh script
- Add the correct hash band identifier, e.g.
#!/bin/bash
β Error: -bash: '\r': command not founxd
β
Solution:
- Caused by Windows-style newline character
- Run
dos2unix
over the file
β Error with pakepkg: Cannot find the fakeroot binary
β
Install the base-devel package group: sudo pacman -S base-devel
β Yarn Error: There are no scenarios; must have at least one.
β
Caused by the wrong yarn being installed, lol. Just remove it and reinstall it
sudo apt remove yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install yarn
βΉοΈ Sources:
β FAILED (unknown public key XXXXX) - One or more PGP signatures could not be verified
β
Solution: Add the PGP public key to your keychain, gpg --recv-key [key ID]
β Docker, Service failed to build: cgroups: cgroup mountpoint does not exist: unknown
β
Temporary workaround:
sudo mkdir /sys/fs/cgroup/systemd
sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd
β Cargo: Failed to parse lock file at: path/to/Cargo.lock
β
This is often caused by using an older version of Cargo. rustup
can be used to update both Cargo and Rust to their latest versions. So just run: rustup update stable
β Go: package build constraints exclude all Go files in...
β
Caused by packages being incorrectly cached, just run: go clean -modcache
β Pacman: [package-name]: [/usr/share/path/to/pakage@latest/file.compiled] exists in filesystem
This is caused by a file already existing, and Pacman not being intended to replace files. It usually happens when you've installed something manually, or using a third-party package manager, and hence it is not being tracked by Pacman.
β Solutions:
Update Mirrors
Sometimes this can be fixed by simply updating the mirrors, with:
sudo pacman-mirrors --fasttrack && sudo pacman -Syyu
Move / Remove Conflicting File
If not, then you can identify which packages owns the offending file, with:
pacman -Qo /path/to/file
.
- If the package is managed by Pacman, then you can move is with
pacman -R
. - Or if it's not linked to anything then either move or remove the file manually (renaming the file to
*.backup
will enable you to roll back if needed).
Overwrite Files
Alternatively there's also an --overwrite
option, that will force Pacman to replace any conflicting files. E.g. sudo pacman -S [package-name] --overwrite '*'
. This is useful when your local database has been "lost", causing every single installed package to throw a "conflicts" error.
βΉοΈ For more information, see:
- https://bbs.archlinux.org/viewtopic.php?id=56373
- https://forum.manjaro.org/t/update-or-package-installation-returns-failed-to-commit-transaction-conflicting-files-filename-exists-in-filesystem/3598
A note for preventing this in the future: When using a third-party installer, always specify an alternative installation location, e.g. /home
, /opt
or /usr/local/
. But never install directly under /
or /usr
.
β Pacman error: failed retrieving file '_' from _ Connection timed out after 10001 milliseconds
β
Update mirrors: sudo pacman-mirrors --country United_Kingdom
β Warning: High IOWait. Raspberry Pi 4, booted from a USB running incredibly slowly
β
Run lsusb -t
if it shows usb-storage
, then UAS is not supported out of the box and you need to either enable it with quirks mode, or use a UAS-compatible drive.
βΉοΈ More Info:
- https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=245931
- https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711_bootloader_config.md
β Error: Using Powerlevel10k in ZSH on R Pi: gitstatus failed to initialize
β Solution:
- Caused by the binary for the gitstatusd module (used to show git into by P10K) not being available for the current architecture
- There are two solutions:
- Either manually compile the binary, and set
GITSTATUS_DAEMON=/path/to/gitstatusd
in~/.zshrc
. See: https://github.com/romkatv/gitstatus/blob/master/README.md#compiling - Or, if you don't need git display, then just comment out
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
from thevcs
section in~/.p10k.zsh
- Either manually compile the binary, and set
βΉοΈ More Info:
- https://github.com/romkatv/gitstatus/issues/73#issuecomment-548046415
- https://github.com/romkatv/powerlevel10k/issues/246#issuecomment-765509082
β wget: WGETRC points to /home/user/.config/wget/wgetrc, which couldn't be accessed because of error: No such file or directory.
β
Caused my missing config file, just: mkdir -p ~/.config/wget/ && touch ~/.config/wget/wgetrc
β ".": Permission denied (os error 13)
β sudo chown -R $(whoami) ./
β /usr/lib/libc.so.6: version
GLIBC_2.34' not found`
β
pacman -S glibc lib32-glibc
β Running ssh-add shows: Error connecting to agent: Connection refused
β
Start the SSH Agent, by running: eval "$(ssh-agent)"
β Git error: only one config file at a time
β unset GIT_CONFIG
β Vercel site behind Cloudflare: err_too_many_redirects
β In Cloudflare dashboard, select your site, and under SSL/TLS, set encryption to "Full"
Web Development
β Flutter Web: No devices detected.
β
Run which [browser-name]
, then store the path in CHROME_EXECUTABLE
environmental variable
E.g. in .zshrc: export CHROME_EXECUTABLE="/opt/brave.com/brave/brave-browser"
β Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (88)
β
Solution:
- Caused by node-sass's binaries being built for a for a different architecture
- To fix this, just run:
npm rebuild node-sass
β TypeError: Cannot assign to read only property 'exports' of object '#' error
β
Solution:
- Caused by using CommonJS syntax instead of ES Modules
- To fix it, just replace
module.exports = myFunc;
withexport default myFunc;
β Error: Cannot find module './_baseValues'
β Solution:
- Clearing the cache fixed this:
yarn cache clean
- If the issue persists, remove (
rm -rf node_modules\ yarn.lock
) and reinstall (yarn
) node_modules
β Error: Gatsby.js randomly decides that it cannot find a certain dependency
- e.g.: No files matching '\x\x\x\node_modules\@gatsbyjs\x\x\x.js' were found.
β
Solution: Remove the cache and restart. rm -rf .cache && yarn develop
β 'React' was used before it was defined
β
Solution: Within .eslintrc under rules
, disable the base rule, and add a TypeScript specific rule
- "no-use-before-define": "off",
- "@typescript-eslint/no-use-before-define": ["error"]
β Error: Delete 'β' prettier/prettier
β
Solution:
- Either change VS Codes end of line sequence from LF to CRLF
- Or add endOfLine: 'auto'
into .prettierrc
β JSX not allowed in files with extension '.tsx'
β
In eslintrc
, under the rules
section, add:
- 'react/jsx-filename-extension': [2, { 'extensions': ['.js', '.jsx', '.ts', '.tsx'] }]
β Start/ end value has mixed support, consider using flex-end instead
β
When using flexbox layout, replace align-items: end;
with align-items: flex-end;
β Project published to GitHub pages using GitHub actions shows as a 404 (even though code is correct)
β
This seems to be a known reliability issues for new sites, and the following things (for some reason) help:
- Ensure that none of your files and sub-folders begin with an
_
, as GitHub / Jekyll ignores these - If you're not using Jekyll, then place a file called
.nojekyll
in your projects root - Remember that URLs are case-sensitive, ensure it's typed correctly, and that you're using
https
- Check an older version is not cached, try clearing your site data, appending a string after
?
in the URL, or use a different browser - Double check that GitHub pages is enabled, pointing to the correct branch, and that there are no errors in the Actions logs
- Ensure your index.html is valid, has a doctype, e.g.
<!DOCTYPE html>
, and doesn't include any non UTF-8 special characters - Push an empty commit to trigger a rebuild:
git commit --allow-empty -m "Trigger rebuild" && git push origin master
- If you bound your domain, before GH pages was deployed, then GitHub caches the broken domain, try removing and re-adding your domain
- Try deleting and re-creating GH Pages branch:
git checkout gh-pages && git push origin --delete gh-pages && git push origin
- Wait for a few hours... Sometimes this issue just fixes itself
- If nothing worked, then open a support ticket. This is a known issue with GitHub pages, and is usually quickly resolved by customer support from their end
β Npm Install global modules fails: Missing write access in mac to /usr/local/lib/nodemodules
β
Just update the permissions of global nodemodules
sudo chown -R $USER ~/.npm
sudo chown -R $USER /usr/lib/nodemodules
sudo chown -R $USER /usr/local/lib/nodemodules
β npm ERR! code UNABLETOGETISSUERCERT_LOCALLY
β
Run: npm config set registry http://registry.npmjs.org/
β Yarn Error: unable to get local issuer certificate
β
yarn config set "strict-ssl" false -g
β go.mod file not found in current directory or any parent directory
β
Run: go env -w GO111MODULE=off
Misc
β Cargo error no such subcommand: 'make'
β
Just install cargo make: cargo install --no-default-features --force cargo-make
β Error on Windows: error during connect: This error may indicate that the docker daemon is not running.: Get http://%2F%2F.%2Fpipe%2Fdockerengine/v1.24/containers/json: open //./pipe/dockerengine: The system cannot find the file specified.
β
Solution:
- Update the security permissions for the docker.exe file, to include "Users" (Right click --> Properties --> Security). This file is usually located in
C:\Program Files/Docker/Docker/
- Then restart Docker: As admin, run
Net stop com.docker.service
andNet start com.docker.service
Also, ensure that you have the latest version of Docker installed, and WSL is set to version 2 (with wsl --set-default-version 2
)
β Docker inspect throws error on Windows: Template parsing error: template: :1: unclosed action
β
Double quotes are required for the JSON keys, e.g. docker inspect --format="{{json .State.Health}}" my-container
β VirtualBox in Windows shows error: VERR_CPUM_RAISE_GP_0 with WSL2
β
Solution:
- As admin, run:
bcdedit /set hypervisorlaunchtype off
- Then shutdown and restart the PC with
shutdown -s -t 2
β Ngrok throws an error with react dev server: Invalid Host Header
β
Add the -host-header flag, e.g. ngrok http 8080 -host-header="localhost:8080"
β Gimp: Unable to apply Rounded Corners (Filters --> DΓ©cor --> xx)
β
Solution:
- Some filters cannot be used with an alpha layer.
- Right-click on the current layer, and "Remove Alpha Channel"
β Ledger: Stuck on "Touch Security Key" using MetaMask on Windows with Ledger Nano X
β
Solution:
- First, allow contract data in transactions (within the Eth app on the Ledger device)
- Disable Bluetooth, in order confirm transactions over USB (on Ledger's device Settings)
β Ledger: On Linux, cannot detect device
β
Solution: Install udev rules
- wget -q -O - https://raw.githubusercontent.com/LedgerHQ/udev-rules/master/add_udev_rules.sh | sudo bash
β Listed.to - Custom domain does not work, even when DNS records are all correct
β
Ensure that DNS records are not proxied through Cloudflare's servers
β Standard Notes Linux - Unable to login, incorrect email and password even when correct
β
Manually update the app to the latest version
β Flutter Web - No devices found
β
If you don't have Chrome installed, then you can use Chromium or any other Chromium-based browser instead. You'll need to set the CHROME_EXECUTABLE
environmental variable to point to it's executable so that Flutter can launch it.
E.g. export CHROME_EXECUTABLE=/usr/bin/brave