Category Archives: Linux

Install Required Fonts for Puppeteer

Install required fonts (i.e Asian fonts) for Puppeteer: apt-get -y -q install xfonts-encodings xfonts-intl-asian xfonts-utils   apt-get -y -q install fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf fonts-ubuntu-title fonts-liberation   mkfontscale && mkfontdir && fc-cacheapt-get -y -q install xfonts-encodings xfonts-intl-asian xfonts-utils apt-get -y -q install fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf fonts-ubuntu-title fonts-liberation mkfontscale && mkfontdir && fc-cache […]

mv: Directory not empty

If you get this error when using mv command: mv: cannot move ‘./source’ to ‘./destination’: Directory not emptymv: cannot move ‘./source’ to ‘./destination’: Directory not empty Then you can fix it by using cp with -r switch, i.e: cp -R /source/* /destination/cp -R /source/* /destination/

Detect a failing hard-disk on a Linux server

When there is an hard-disk failing issue generally the file system will be read-only. You would get errors like these: rm: cannot remove ‘error.log’: Read-only file system cannot create temp file for here-document: Read-only file system -bash: df: command not foundrm: cannot remove ‘error.log’: Read-only file system cannot create temp file for here-document: Read-only file […]

Certbot.errors.CertStorageError: expected to be a symlink

Example certbot error message: certbot.errors.CertStorageError: expected /etc/letsencrypt/live/www.website.com/cert.pem to be a symlink Renewal configuration file /etc/letsencrypt/renewal/www.website.com.conf is broken. Skipping.certbot.errors.CertStorageError: expected /etc/letsencrypt/live/www.website.com/cert.pem to be a symlink Renewal configuration file /etc/letsencrypt/renewal/www.website.com.conf is broken. Skipping. Solution is to re-create the symlinks for all .pem files: rm -f /etc/letsencrypt/live/www.website.com/*.pem ln -s /etc/letsencrypt/archive/www.website.com/cert1.pem /etc/letsencrypt/live/www.website.com/cert.pem ln -s /etc/letsencrypt/archive/www.website.com/chain1.pem /etc/letsencrypt/live/www.website.com/chain.pem ln -s /etc/letsencrypt/archive/www.website.com/fullchain1.pem […]

Example hard-disk error logs on a Linux server

Here is an example of logs related to a failing hard-disk: root@server:~# cat /var/log/syslog   Dec 3 02:35:54 server kernel: [6703851.044036] sd 0:2:0:0: [sda] tag#18 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK Dec 3 02:35:54 server kernel: [6703851.044065] sd 0:2:0:0: [sda] tag#18 CDB: Write(10) 2a 00 31 20 31 00 00 01 00 00 Dec 3 02:35:54 server […]

Certbot renew error: Account at does not exist.

If you get this certbot error: – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – Processing /etc/letsencrypt/renewal/www.website.com.conf – – – – – – – […]

Exclude Packages from Apt-Get Upgrade on Debian Linux

To exclude/hold a package from apt-get upgrade type: apt-mark hold package_nameapt-mark hold package_name For example, to exclude MariaDB mysql packages type: apt-mark hold galera-3 libmariadb3 libmariadbclient18 mariadb-client-10.3 mariadb-client-core-10.3 mariadb-common mariadb-server mariadb-server-10.3 mariadb-server-core-10.3 mysql-commonapt-mark hold galera-3 libmariadb3 libmariadbclient18 mariadb-client-10.3 mariadb-client-core-10.3 mariadb-common mariadb-server mariadb-server-10.3 mariadb-server-core-10.3 mysql-common Here is an example output: libmariadbclient18 set on hold. mariadb-client-10.3 set […]

What to Select on GRUB-PC Configuration “Install Devices”

Today when I did an “apt-get dist-upgrade” I received this: Looks like GRUB-PC was updated and now it asks: What do you want to do about modified configuration file grub?What do you want to do about modified configuration file grub? I selected “Keep the local version currently installed”. Then it happeared another window asking this: […]

E: Could not get lock /var/lib/dpkg/lock

If you get the following error while doing apt-get upgrade: E: Could not get lock /var/lib/dpkg/lock – open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?E: Could not get lock /var/lib/dpkg/lock – open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is […]