Wireguard VPN - How to fix Operation not supported if it worked before? - wireguard

Trying to get up my VPN interface with sudo wg-quick down wg0;sudo wg-quick up wg0 raised:
RTNETLINK answers: Operation not supported
Unable to access interface: Protocol not supported
I am not sure what happened but the only thing I did was reboot. I did not update my packages. Still something apparently changed.

In my case there were no appropriate kernel headers installed.
First you need to know your current kernel version:
# uname --kernel-release
4.19.0-14-cloud-amd64
Important part here is "cloud-amd64" (there are several versions of "linux-headers-..." package, use apt list linux-headers-* to see what is available).
Then install appropriate kernel headers (I'm using Debian):
# apt install linux-headers-cloud-amd64
Then re-install wireguard-dkms package:
# apt install --reinstall wireguard-dkms
Reboot your OS:
# reboot

In my case (Debian 10, PiVPN) i had to:
Install linux headers:
apt-get update
apt-get install linux-image-amd64 linux-headers-amd64
reboot
apt reinstall wireguard-dkms
reboot

Running apt update / upgrade revealed that there are wireguard updates available. Install those (you might have to reboot as well) and all will work fine again.
Secure boot as the internet suggests was a false trail in my case.

solution can be simple:
set in
[Interface]
MTU = 1412
to avoid packet limitations.
Done.
You may elaborate a smaller fitting size.

In my case it was enough:
sudo apt update
sudo apt upgrade
sudo reboot

Related

How to fix '(38)Function not implemented: AH00141: Could not initialize random number generator' after upgrading Apache from 2.4.18 to 2.4.46?

I have a running system with Ubuntu 16.04, Apache 2.4.18, PHP 7.3 and 7.4, PHP-FPM, PHP FastCGI, MPM event.
I wanted to upgrade to the latest Apache version (2.4.46-2+ubuntu16.04.1+deb.sury.org+3 amd64 [upgradable from: 2.4.18-2ubuntu3.17]) as follows:
add-apt-repository -y ppa:ondrej/apache2
apt update
apt-get --only-upgrade install apache2
service apache2 restart
Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
journalctl -xe
apachectl[9010]: [:crit] [pid 9013] (38)Function not implemented: AH00141: Could not initialize random number generator
I checked and /dev/random and /dev/urandom are installed.
Kernel: 4.4.0-042stab141.2 and libc6: 2.23-0ubuntu11.2
Happened to me after upgrading apache to version 2.4.46 on Ubuntu as well. I found out it was the kernel version.
I knew I did apt-get upgrade and the kernel should be latest version, Also running
sudo update-grub
Showed me newer versions, but running uname -r showed very old kernel.
After a long investigation that took almost all day and trying everything I found online about upgrading Ubuntu kernel - I found out it was Digitalocean, not me. Old droplets use external managed kernel - so no matter what you do on your environment, it will always take the external kernel. The solution was here:
https://www.digitalocean.com/docs/droplets/how-to/kernel/grubloader/#switch
If you do see the drop down & change button in your droplet settings in Digital ocean control panel, then your kernel is externally managed. In that drop down type “grub” and choose GrubLoader v0.2, press “change” button & that’s it!
Now you’ll need to shut down & turn back on your server, but before you do so I suggest to run the following commands:
sudo apt-get update
sudo apt-get upgrade
The above upgrade will update the whole system. To update just kernel run the above update command followed by:
sudo apt-get upgrade linux-image-generic
Now shut down (sudo poweroff or power off from DigitalOcean interface, though doing it from CLI is preferred). Note that reboot is not sufficient in this particular case and a complete shut down is needed (Thanks #gauss256 for your comment). Then power it back on from digital ocean interface, And upon startup you should see a new kernel version.
Tip - you might want to delete old Kernel files after the reboot, this can be done by:
sudo apt-get purge $( dpkg --list | grep -P -o "linux-image-\d\S+" | grep -v $(uname -r | grep -P -o ".+\d") )

How to install ROS on Ubuntu 18.04?

Im running Ubuntu 18.04 and trying to install ROS for the first time on my machine. I have tried to follow the instructions at: http://wiki.ros.org/melodic/Installation/Ubuntu
I get stuck at this part.
sudo apt-get install ros-melodic-desktop-full
My attempts:
sudo apt -f install
sudo apt update --fix-missing
sudo dpkg --configure -a
sudo dpkg --remove --force-remove--reinstreq
sudo apt clean
sudo apt update
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
Nothing has worked so far.
Terminal commands:
$sudo apt-get install ros-melodic-desktop-full
Reading package lists… Finished
Builds dependency trees
Reading state information ... Finished
Some packages could not be installed. It may mean that you have requested
an impossible situation or, if you use the unstable distribution
that some necessary packages have not yet been created or moved
from "Incoming".
The following information may help to resolve the situation:
The following packages have dependencies that cannot be satisfied:
rose-melodic-desktop-full: Dependent on: rose-melodic-desktop but it will not be installed
Depending on: rose-melodic-perception but it will not be installed
Depending on: rose-melodic-simulators but it will not be installed
Depending on: ros-melodic-urdf-sim-tutorial but it will not be installed
E: Could not correct the problems, you have withheld broken packages.
Please help me install ROS
1 - After following ROS melodic Installation first steps (see link below), Try to install it with the link "click here" below the "sudo apt install ros-melodic-desktop-full" line
ROS melodic Installation page
If it's doesn't work
2 - check, "Software & Update" parameters
(if you cannot find it: launch "Ubuntu Software Center" and in the menu bar, on top, select "Software & Update")
In "Other Sofware" tab, the link
"http://pacckage.ros.org/ros/ubuntu bionic main"
is printed, and in "Autentication" tab a key from Open Robotics is printed
3 - Try to do 1- again, if it doesn't work, follow 4-
4 - In "Updates" tab, check "recommanded Updates", launch "Update Manager" and install updates (I don't do it properly on my PC)
5 - And finally you need to install manually rosdep with:
"sudo apt-get install python-rosdep"
Ubuntu (apt) does NOT allow packages with the same name but different versions to be installed.
Remove other versions first. For example: apt remove ros-desktop*
first of all install program on ubuntu.
sudo apt-get update
sudo apt-get upgrade
after update packet try follow the instructions at: enter link description here again
I got it working like so:
Install deps:
sudo apt install gazebo9-common libgazebo9-dev gazebo9 ros-melodic-gazebo-ros-pkgs ros-melodic-gazebo-dev ros-melodic-gazebo-ros-control ros-melodic-gazebo-ros ros-melodic-urdf-sim-tutorial ros-melodic-simulators
Install ros melodic
sudo apt-get install ros-melodic-desktop-full

Update Apache 2.4.34 to 2.4.35 in Ubuntu 16.04

I have tried the following first in Ubuntu Server
sudo apt-get update
sudo apt-get upgrade
No signs of software updates in the Ubuntu Server repository.
So I went ahead with PPA with the following
add-apt-repository ppa:ondrej/apache2
apt-get update
apt-get upgrade
OR
sudo add-apt-repository ppa:ondrej/apache2
sudo apt update
sudo apt install apache2
But no luck as PPA is having 2.4.34 as the latest one.
NOTE: Even I restarted and check with stopping and starting my Apache2
server.
But seems nothing working is there any other way I can update it to the latest version. This is important as our project is stuck with a Security Assessment.
And in version 2.4.34 there is DDOS security vulnerability. And has been fixed in 2.4.35
Can anyone help me out with updating apache2, even redirects to any sites or links are welcome.
All you need to download this version and enjoy , just
install it manually https://httpd.apache.org/download.cgi

installing msodbcsql failed on linux cause of depends on libcurl3

In my Debian system used php7.2.4-1, I would connect sqlserver in my project. however, it return failed installing msodbcsql which depends on libcurl3 . And it is libcurl4 in my debian system.
I try to install libcurl3 and the reason is that the php7.2-curl is not work.
php7.2 depends on libcurl4
msodbcsql or msodbcsql17 depends on libcurl3
So can I install both libcurl3 and libcurl4? Or is there any other way around?
Thank you!
So your issue is that you are trying to mix stretch and buster packages, and there is a libcurl version transition across that upgrade.
msodbcsql is available for stretch.
php7.2 is available for buster, stretch has php7.0.
msodbcsql depends on libcurl3, available in both stretch and buster.
php7.2 depends on libcurl4 which is only available for buster.
libcurl3 and libcurl4 conflict, for reasons I'll expand on.
Mixing stretch and buster packages is very possible but considered unsupported by Debian due to occasional issues like this. The third party msodbcsql package is also unsupported.
Option 1: Avoid msodbcsql
If you just want to use odbc with PHP you probably don't need msodbcsql. The php-odbc package will do what you need.
Option 2: Downgrade
The easy solution to avoid the conflicts would be to downgrade php to php7.0, available on stretch and using libcurl3. All conflicts go away.
Option 3: Forced the dependency
Another solution is to download the msodbcsql package and force install it using
dpkg --ignore-depends=libcurl3 -i msodbcsql.deb
This will probably work in practice because the difference between libcurl3 and libcurl4 is a minor incompatible API change for a depreciated FTP function. As msodbcsql will probably not use that function there won't be any issues.
The Debian package manager will however complain bitterly, some options to fit that how-do-i-get-apt-get-to-ignore-some-dependencies.
Option 4: Containerise it
Finally, if you aren't using msodbcsql and PHP together then a container to keep the conflicts apart would be worth considering.
In 7.2.9-1 for Ubuntu 16 the php-curl extension work with libcurl4.
You can simply download the php packages that are prepared for debian installation and manually install with APT. The previously installed packages will be downgraded/upgraded to the new version:
mkdir ./php7.7.9
cd php7.2.9
wget http://ftp.br.debian.org/debian/pool/main/p/php7.2/php7.2_7.2.9-1_all.deb
wget http://ftp.br.debian.org/debian/pool/main/p/php7.2/php7.2-bz2_7.2.9-1_amd64.deb
wget http://ftp.br.debian.org/debian/pool/main/p/php7.2/php7.2-cli_7.2.9-1_amd64.deb
wget http://ftp.br.debian.org/debian/pool/main/p/php7.2/php7.2-common_7.2.9-1_amd64.deb
wget http://ftp.br.debian.org/debian/pool/main/p/php7.2/php7.2-curl_7.2.9-1_amd64.deb
wget http://ftp.br.debian.org/debian/pool/main/p/php7.2/php7.2-dev_7.2.9-1_amd64.deb
wget http://ftp.br.debian.org/debian/pool/main/p/php7.2/php7.2-fpm_7.2.9-1_amd64.deb
wget http://ftp.br.debian.org/debian/pool/main/p/php7.2/php7.2-gd_7.2.9-1_amd64.deb
wget http://ftp.br.debian.org/debian/pool/main/p/php7.2/php7.2-imap_7.2.9-1_amd64.deb
wget http://ftp.br.debian.org/debian/pool/main/p/php7.2/php7.2-intl_7.2.9-1_amd64.deb
wget http://ftp.br.debian.org/debian/pool/main/p/php7.2/php7.2-json_7.2.9-1_amd64.deb
wget http://ftp.br.debian.org/debian/pool/main/p/php7.2/php7.2-ldap_7.2.9-1_amd64.deb
wget http://ftp.br.debian.org/debian/pool/main/p/php7.2/php7.2-mbstring_7.2.9-1_amd64.deb
wget http://ftp.br.debian.org/debian/pool/main/p/php7.2/php7.2-mysql_7.2.9-1_amd64.deb
wget http://ftp.br.debian.org/debian/pool/main/p/php7.2/php7.2-opcache_7.2.9-1_amd64.deb
wget http://ftp.br.debian.org/debian/pool/main/p/php7.2/php7.2-readline_7.2.9-1_amd64.deb
wget http://ftp.br.debian.org/debian/pool/main/p/php7.2/php7.2-soap_7.2.9-1_amd64.deb
wget http://ftp.br.debian.org/debian/pool/main/p/php7.2/php7.2-xml_7.2.9-1_amd64.deb
wget http://ftp.br.debian.org/debian/pool/main/p/php7.2/php7.2-xmlrpc_7.2.9-1_amd64.deb
wget http://ftp.br.debian.org/debian/pool/main/p/php7.2/php7.2-zip_7.2.9-1_amd64.deb
apt install ./*.deb

Macports: what exactly does the -f flag mean?

Let's contrast
sudo port install [port_name]
and
sudo port -f install [port_name]
What exactly does the flag -f do in this case? Why don't we use the -f flag each time we install a new port?
On installation, the force flag is used to force activation in case a file that would be provided by the port you are installing already exists on your system. Without the force flag, MacPorts will abort the installation and warn you; with the flag, MacPorts will rename the existing file (appending .mp_$timestamp).
Forcing may become necessary if you have previously uninstalled a version of MacPorts but not cleaned up all the files it provided, or if a third-party installer built using MacPorts installed files into /opt/local (which is wrong, but still happens sometimes).
Because overwriting is not safe behavior, it isn't the default. This is also the reason why you should not always specify -f.
The flag -f is to force the install/install. If there are dependencies that is preventing macports from installing/uninstalling, you can use the -f flag to force the install/uninstall but that is not a desirable way of installing/uninstalling.
Take a look at explanation from https://guide.macports.org/
sudo port uninstall libcomerr
---> Unable to uninstall libcomerr #1.42.9_0, the following ports depend on it:
---> kerberos5 #1.11.3_0
---> subversion #1.8.9_0
---> subversion-perlbindings-5.16 #1.8.9_0
Error: port uninstall failed: Please uninstall the ports that depend on libcomerr first.
You can recursively uninstall all ports that depend on the given port before uninstalling the port itself to work around this. To do that, use the --follow-dependents flag.
$ sudo port uninstall --follow-dependents libcomerr
You can also override this safety check using the -f (force) flag.
Since this will obviously break the dependents you shouldn't do this
unless you know what you are doing.
$ sudo port -f uninstall libcomerr
Although this is an example of uninstall, you can see how -f flag works.

Resources