Unable to install gem – Failed to build gem native extension – cannot load such file — mkmf (LoadError)

There are similar questions: `require’: no such file to load — mkmf (LoadError) Failed to build gem native extension (mkmf (LoadError)) – Ubuntu 12.04 Usually, the solution is: sudo apt-get install ruby-dev Or, if that doesn’t work, depending on your ruby version, run something like: sudo apt-get install ruby1.9.1-dev Should fix your problem. Still not … Read more

Delete all local git branches

The ‘git branch -d’ subcommand can delete more than one branch. So, simplifying @sblom’s answer but adding a critical xargs: or, further simplified to: Importantly, as noted by @adminndrewC, using git branch for scripting is discouraged. To avoid it use something like: Caution warranted on deletes!

gpg: no valid OpenPGP data found

This problem might occur if you are behind corporate proxy and corporation uses its own certificate. Just add “–no-check-certificate” in the command. e.g. wget –no-check-certificate -qO – http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add – It works. If you want to see what is going on, you can use verbose command instead of quiet before adding “–no-check-certificate” option. … Read more

Error: A JNI error has occurred, please check your installation and try again – during running Java program from Ubuntu terminal

The error says it all: Exception in thread “main” java.lang.UnsupportedClassVersionError: Test has been compiled by a more recent version of the Java Runtime (class file version 55.0)… You’ve compiled for Java 11 … but you’re running an older JRE (Java 8). SUGGESTIONS: recompile with -source and -target to target an earlier version of Java in your .class file, or … Read more

How to open some ports on Ubuntu?

I know little about Linux.Today I create a VPN server on My ubuntu according to https://github.com/philplckthun/setup-simple-ipsec-l2tp-vpn But when I finish the installation. I use my iphone to connect the ipsect vpn,bur it shows the VPN Server has no response. The github document shows Ports 1701, 500 and 4500 must be opened for the VPN to work! So … Read more

gpg: no valid OpenPGP data found

This problem might occur if you are behind corporate proxy and corporation uses its own certificate. Just add “–no-check-certificate” in the command. e.g. wget –no-check-certificate -qO – http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add – It works. If you want to see what is going on, you can use verbose command instead of quiet before adding “–no-check-certificate” option. … Read more

WSL – GEDIT Unable to init server: Could not connect: Connection refused

You need an X server to run graphical applications like gedit. I use VcXsrv or Xming on my Windows desktops, both are very small and easy to install, but there exist other servers like Cygwin/X. Short instructions for VcXsrv/Xming: download and install the Windows package start XLaunch or Xming export the DISPLAY variable in your WSL terminal and start geditexport DISPLAY=0:0 … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)