Download a package using apt on Debian/Ubuntu

download package using apt

On Debian and Ubuntu servers, you can download a package using apt download command. apt download PKG_NAME Package will get downloaded to current working directory. Better do this to /tmp to avoid permission errors. Method 2 If you want to download package and dependencies, then use apt-get install –download-only PKG_NAME This will download the package … Read more

Blocking Package Upgrade on Debian/Ubuntu

To block packages from upgrading, you can use command apt-mark hold. apt-mark hold PKG_NAME Example apt-mark hold libtomcat8-java tomcat8 tomcat8-admin tomcat8-common To list packages that are on hold, run root@ip-172-26-8-193:~# apt-mark showhold libtomcat8-java tomcat8 tomcat8-admin tomcat8-common root@ip-172-26-8-193:~# If you want to remove block, you can use apt-mark unhold command. apt-mark unhold libtomcat8-java tomcat8 tomcat8-admin tomcat8-common … Read more

Configure KVM Bridge Network on Debian 10

Before you configure bridge network, make sure you have bridge-utils installed. apt install bridge-utils You may also need ifdown and resolvconf packages installed apt install ifupdown resolvconf Here is the default /etc/network/interfaces i had on the server root@PAR-199235:~# cat /etc/network/interfaces # This file describes the network interfaces available on your system # and how to … Read more

Install kvm on Debian 10

To install kvm on Debian 10, run apt install -y qemu-kvm Install libvirt, it is a tool to manage kvm apt install libvirt-clients libvirt-daemon libvirt-daemon-system Set libvirtd to start on boot systemctl enable libvirtd Restart libvirtd systemctl restart libvirtd You can see libvirtd status with systemctl status libvirtd Install virtinst, it is used to create … Read more

apt-get An error occurred during the signature verification

When running apt update, i get following error W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://packages.cloud.google.com cloud-sdk-jessie InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 6A030B21BA07F4FB To fix this error, run apt-key … Read more

Expired Updates for this repository will not be applied

When running apt update on a Debian jessie server, i get following error E: Release file for http://archive.debian.org/debian/dists/jessie-backports/InRelease is expired (invalid since 513d 20h 41min 47s). Updates for this repository will not be applied To fix the error, run echo “Acquire::Check-Valid-Until false;” | sudo tee -a /etc/apt/apt.conf.d/10-nocheckvalid

apt force IPv4

One of my internet provider only provide IPv4 connection. When i run apt install command, it failed with error as it try to connect using IPv6. To force apt to use IPv4 only, edit Add If you want to force IPv6, add

Install Elasticsearch 6 on Debian for Magento

To install Elasticsearch for Magento on Debian, install Java 1.8 and apt-transport-https apt install -y openjdk-8-jdk-headless apt install -y apt-transport-https Add key wget -qO – https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add – Add repository echo “deb https://artifacts.elastic.co/packages/6.x/apt stable main” | tee -a /etc/apt/sources.list.d/elastic-6.x.list Install Elasticsearch apt update apt install -y elasticsearch Enable and start Elasticsearch systemctl enable … Read more

debconf: unable to initialize frontend: Dialog

When installing a program in Ubuntu 18.04 server minimal installation, i get following error debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline To fix this, run apt -y install whiptail OR apt … Read more

Linux KVM Bridge network on Ubuntu

On Ubuntu 18.04 server, first i get Ubuntu to use /etc/network/interface, by default Ubuntu 18.04 and newer use netplan. First install ifdown apt install ifupdown -y Install bridge utils and resolvconf. apt install bridge-utils resolvconf Now you can configure your network interface by editing file vi /etc/network/interface Here is my network configuration on an OVH … Read more

Install ShadowSocks server on Debian 10

To install ShadowSocks server on Debian 10, run apt install -y shadowsocks Create config file vi /etc/shadowsocks/config.json Add following { “server”:”SERVER_IP”, “server_port”:8044, “local_port”:0, “password”:”PASSWOARD_HERE”, “timeout”:600, “method”:”aes-256-cfb” } You can change server_port if required. To enable service, run systemctl enable shadowsocks-server@config To start shadowsocks proxy, run systemctl start shadowsocks-server@config For status/restart systemctl status shadowsocks-server@config systemctl restart … Read more

Ubuntu Configure systemd-resolved

Latest Ubuntu/Debian use systemd-resolved for DNS resolution. On a fresh Ubuntu 19.04 install DNS failed to resolve. root@ubuntu19:/# ping serverok.in ping: serverok.in: Temporary failure in name resolution root@ubuntu19:/# To fix this, create file mkdir /etc/systemd/resolved.conf.d/ vi /etc/systemd/resolved.conf.d/dns_servers.conf Add content [Resolve] DNS=8.8.8.8 1.1.1.1 Restart systemd-resolved systemctl restart systemd-resolved You can find systemd-resolvd status with command resolvectl … Read more