The error “The repository is not updated and the previous index files will be used. GPG error: https://nginx.org/packages/mainline/debian bullseye InRelease: The following signatures were invalid” suggests that the GPG key for the Nginx repository is either missing, expired, or invalid. Here’s how to fix it in Debian 11 GNU Linux (Bullseye):
1. Remove Old Nginx GPG Keys
Old or conflicting keys can cause issues, so remove them first:
Ensure your /etc/apt/sources.list.d/nginx.list contains the correct repository entry:
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://nginx.org/packages/mainline/debian bullseye nginx" | sudo tee /etc/apt/sources.list.d/nginx.list
4. Update Package Lists
Now, refresh the package lists:
sudo apt update
If the update runs without errors, you can proceed with installation:
sudo apt install nginx
To fix error “The repository is not updated and the previous index files will be used. GPG error: https://packages.sury.org/apache2 bullseye InRelease: The following signatures were invalid” use commands:
This article will show how to grow a partition on your Linux partition to fill the entire disk using growpart. This is useful if you have resized a virtual machine disk, or moved to a larger disk on your desktop or laptop Linux system.
Step 1: Listing and Identifying Storage Devices
To expand the filesystem on your resized disk, you’ll need to first locate the disk using the lsblk command, execute it by running:
lsblk
And you will see output similar to the following listing storage devices and the partitions on them:
Above, you can see that disk sda has a size of 50 gigabytes, but that the volume containing the root partition (sda3) is only 29.5 gigabytes – there is unused space on the storage device.
There may be multiple entries in the output from lsblk – you’ll need to identify the disk you have resized by the size and utilization – it should be apparent which disk has unused space. Usually on single-disk machines, the first and only storage device will be named sda.
You will also need to know the name of the partition your wish to grow – in this case sda3 – usually identified by it having the root mount point of /.
Step 2: Installing growpart
growpart is a utility that makes it super easy to grow a partition. It’s part of the cloud-guest-utils package. Note that while this package is intended to work on cloud-hosted virtual machines, the growpart utility also works just fine on physical machines.
On Debian and Ubuntu, run:
sudo apt install cloud-guest-utils
On Arch, run:
pacman install cloud-guest-utils
On RedHat, run:
yum install cloud-utils-growpart -y
Step 3: Grow your Partition
Once growpart is available, growing a partition to use the entire remaining disk space is as simple as running:
sudo growpart /dev/sda 3
You’ll need to specify the correct partition name above, replaceing sda 3 (note the space! the device and partition number are separated when using growpart) if necessary. growpart is executed with no additional parameters – if the size parameter is not specified, it will default to the available size of the partition.
Now that the partition has been expanded, the file system must be also using resize2fs:
sudo resize2fs /dev/sda3
Note that the space has disappeared in the device path again.
You will see output similar to:
Confirming the change. Once this final step is done, reboot:
If using systemd-resolved as your DNS resolver (i.e. the hosts line of your /etc/nsswitch.conf file includes the word resolve and/or /etc/resolv.conf contains the line nameserver 127.0.0.53), then this command will flush its cache:
This will encode the video to H.264 video and AAC audio, using the default quality. To change the quality for the video, use a different CRF value, where lower means better, e.g. 20 or 18. For audio, 100% is the default quality. Increase the value for better quality.
For the AppleTV specifically, this is what Apple says it supports:
H.264 video up to 1080p, 30 frames per second, High or Main Profile level 4.0 or lower, Baseline profile level 3.0 or lower with AAC-LC audio up to 160 kbit/s per channel, 48 kHz, stereo audio in .m4v, .mp4, and .mov file formats
So, you could use the following command to force the 30 Hz frame rate and High profile:
All the components of the LAMP server are available to install using the default system repository of Ubuntu. Hence, we can configure the environment without adding an extra repository. However, before moving forward, just run the system update command to ensure the system rebuilds the APT package index cache.
sudo apt update
Install Lamp server
We can install LAMP server components one by one on our Ubuntu system. However, it is a time-consuming process, hence to make it short here we are using a single command. That will not only install the LAMP server but also enable and start all the required services.
sudo apt install lamp-server^ php
The above command will select all the required packages to set up Apache, MySQL, and PHP on your system.
Uninstall the LAMP Server
Well, when it comes to uninstalling the LAMP server completely from your Ubuntu system, we can use the given command:
Webp is an open-source image format in Linux which supports lossless and lossy compression for images on the web.
One of the best practices to optimize the website performance is using compressed images.
This article will cover how to use webp image format for creating compressed and quality images for the website.
Installation
The webp package is already available in the official ubuntu repositories. Run the command below to update the Ubuntu repository to the latest index and install webp package.
sudo apt install webp
Converting image to webp format
Using the cwebp tool, an image can be converted into webp format. Run the cwebp command with option -q to define the quality of image and -o to define the output file.
In this example, I have used image file linux.png and linux.jpeg file to convert in webp format. You can choose your image name accordingly.
cwebp -q 60 linux.png -o linux.webp
cwebp -q 60 linux.jpeg -o linux1.webp
Converting webp image to png and jpeg format
In the previous step, we converted jpeg and png images to webp using cwebp utility tool. Now we will use the dwebp tool to convert webp images into png and jpeg format.
Use the dwep command with the option -o to create png and jpeg image format from webp. In the example, image.webp is used for the conversion.