Error ini biasanya terjadi pada saat menginstal aplikasi di Ubuntu.

Contoh kasus 1

Unpacking replacement smplayer ...
dpkg: error processing /var/cache/apt/archives/smplayer_0.6.9+svn3595-1ppa1~maverick1_i386.deb (--unpack):
trying to overwrite '/usr/share/smplayer/translations/smplayer_eu.qm', which is also in package smplayer-translations 0.6.9-1
dpkg-deb: subprocess paste killed by signal (Broken pipe)

Contoh kasus 2

sudo apt-get install dockmanager
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
dockmanager
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/94.4kB of archives.
After this operation, 430kB of additional disk space will be used.
(Reading database ... 162015 files and directories currently installed.)
Unpacking dockmanager (from .../dockmanager_0.1.0~bzr83-0ubuntu1~10.10~dockers1_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/dockmanager_0.1.0~bzr83-0ubuntu1~10.10~dockers1_amd64.deb (--unpack):
trying to overwrite '/usr/share/dockmanager/data/skype_invisible.svg', which is also in package faenza-icon-theme 0.8
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/dockmanager_0.1.0~bzr83-0ubuntu1~10.10~dockers1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Cara Memperbaikinya

Untuk memperbaikinya (dalam banyak kasus), caranya adalah perhatikan alur jalan (path) file tersebut. Untuk kasus 1 alurnya adalah

“/var/cache/apt/archives/smplayer_0.6.9+svn3595-1ppa1~maverick1_i386.deb” kemudian atasi dengan menjalankan perintah:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/smplayer_0.6.9+svn3595-1ppa1~maverick1_i386.deb

Bila perintah “–force-overwrite” gagal, coba gunakan “–force-all”.

Perintah diatas bila alur jalan (path)-nya sama. Bila menginstall melalui repository maka file .deb ada di /var/cache/apt/archives

Perintah-perintah diatas adalah untuk mengatasi masalah bila 2 paket aplikasi menyebabkan terjadinya error. Untuk memastikan aplikasi terinstall dengan sukses, jalankan perintah:

sudo apt-get install -f

Semoga bermanfaat, terima kasih :)

 
1. Install and select LFS file 
git lfs install

# I am adding the deep learning model file
git lfs track "*.h5

2. Commit and push to the GitHub 
git lfs push --all origin main

git add .
git commit -am "add large file"
git push -u origin main

Solve large file upload issue

If already uploaded the file and remote: error: This model.h5 file is more than 100.00 MB in size exceeds the Git file size limit of 100.00 MB similar issue, It can be solved with those methods.

1. Reset Git
git reset HEAD~<HOWEVER MANY COMMITS YOU WERE BEHIND>
If you want to go before one commit: git reset HEAD~1
Tips: Check git log: git log

2. Check status and push 
git status
git push

 
Persiapan :
1. DNS A Record sudah terpointing beserta CNAME (www dan non-www)
2. Certbot (nginx atau apache)
3. Install webserver nginx atau apache 
4. Definisikan konfigurasi blok NS di nginx/apache (www dan non www)

# Instal Certbot Apache (Deb/Ubuntu Install)
sudo apt install certbot python3-certbot-apache

# Jalankan Certbot
sudo certbot run

# Membuat Penjadwalan certbot auto-renew
sudo crontab -e

Add:MAILTO="" # paling atas skrip cron ini akan menonaktifkan banyak email yang mengganggu.

Kemudian tambahkan ini ke bagian bawah skrip untuk menjalankan pembaruan setiap 7 hari:

0 5 */7 * * certbot renew --renew-hook "service restart apache2"

# Perbarui/install secara manual dan minta certbot membuat file apache.conf khusus

certbot --cert-name yourcertificatename -d site1.com -d site2.com -d site3.com

# Perbarui banyak secara manual hanya dengan sertifikat (tidak ada perubahan file konfigurasi). Ini berguna jika Anda perlu menambah atau menghapus domain.

certbot certonly --cert-name yourcertificatename -d site1.com -d site2.com -d site3.com

# Jalankan skrip cron untuk memperbarui sertifikat certbot secara otomatis, setiap 2 bulan

Pertama, ikuti petunjuk untuk menginstal sertifikat terlebih dahulu. Kemudian:

Buka crontab sebagai pengguna admin sudo crontab -e

Crontab akan meminta Anda untuk memilih editor Anda. Nano biasanya baik-baik saja.

Crontab menggunakan pola ini: {(minute) (hour) (day-of-month) (month) (day-of-week) (command)} semuanya dipisahkan oleh satu spasi.

Tambahkan baris ini ke akhir crontab Anda:
* 1 10 */2 * certbot certonly --force-renewal --webroot -w /path/to/web/root -d example.com

Ini memberi tahu crontab untuk mengeksekusi perintah certbot setiap menit setelah jam 1 pagi, pada tanggal 10 setiap bulan, setiap 2 bulan, setiap hari dalam seminggu.

Sub-perintah certonly memberi tahu Certbot untuk sekadar memperbarui sertifikat dan tidak mengubah file apache.conf.

Menurut dokumentasi Certbot "Jika Anda tidak menentukan perilaku yang diminta, Certbot mungkin menanyakan apa yang Anda maksudkan." Jadi untuk menghindari mengajukan pertanyaan dalam proses otomatis kami, kami menggunakan opsi --force-renewal.

Opsi --webroot memberi tahu Certbot untuk menggunakan tipe autentikasi http-01.

Bendera -w menetapkan jalur ke webroot.

Dan terakhir flag -d memberi tahu Certbot domain mana yang akan diperbarui.

# Instal Certbot Nginx (Deb/Ubuntu Install)
sudo apt install certbot python3-certbot-nginx

- Buat SSL by Certbot
sudo certbot --nginx -d your_domain -d www.your_domain
- Perbaharui Sertifikat SSL
sudo certbot certonly -d your_domain -d www.your_domain
- Paksa Perbaharui Sertifikat SSL
sudo certbot certonly --force-renew -d your_domain -d www.your_domain

Referensi : 
- https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04

- https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-20-04

 
* Save monitor.sh
            
#! /bin/bash
# unset any variable which system may be using

unset tecreset os architecture kernelrelease internalip externalip nameserver loadaverage

while getopts iv name
do
        case $name in
          i)iopt=1;;
          v)vopt=1;;
          *)echo "Invalid arg";;
        esac
done

if [[ ! -z $iopt ]]
then
{
wd=$(pwd)
basename "$(test -L "$0" && readlink "$0" || echo "$0")" > /tmp/scriptname
scriptname=$(echo -e -n $wd/ && cat /tmp/scriptname)
su -c "cp $scriptname /usr/bin/monitor" root && echo "Congratulations! Script Installed, now run monitor Command" || echo "Installation failed"
}
fi

if [[ ! -z $vopt ]]
then
{
echo -e "tecmint_monitor version 0.1\nDesigned by Tecmint.com\nReleased Under Apache 2.0 License"
}
fi

if [[ $# -eq 0 ]]
then
{


# Define Variable tecreset
tecreset=$(tput sgr0)

# Check if connected to Internet or not
ping -c 1 google.com &> /dev/null && echo -e '\E[32m'"Internet: $tecreset Connected" || echo -e '\E[32m'"Internet: $tecreset Disconnected"

# Check OS Type
os=$(uname -o)
echo -e '\E[32m'"Operating System Type :" $tecreset $os

# Check OS Release Version and Name
###################################
OS=`uname -s`
REV=`uname -r`
MACH=`uname -m`

GetVersionFromFile()
{
    VERSION=`cat $1 | tr "\n" ' ' | sed s/.*VERSION.*=\ // `
}

if [ "${OS}" = "SunOS" ] ; then
    OS=Solaris
    ARCH=`uname -p`
    OSSTR="${OS} ${REV}(${ARCH} `uname -v`)"
elif [ "${OS}" = "AIX" ] ; then
    OSSTR="${OS} `oslevel` (`oslevel -r`)"
elif [ "${OS}" = "Linux" ] ; then
    KERNEL=`uname -r`
    if [ -f /etc/redhat-release ] ; then
        DIST='RedHat'
        PSUEDONAME=`cat /etc/redhat-release | sed s/.*\(// | sed s/\)//`
        REV=`cat /etc/redhat-release | sed s/.*release\ // | sed s/\ .*//`
    elif [ -f /etc/SuSE-release ] ; then
        DIST=`cat /etc/SuSE-release | tr "\n" ' '| sed s/VERSION.*//`
        REV=`cat /etc/SuSE-release | tr "\n" ' ' | sed s/.*=\ //`
    elif [ -f /etc/mandrake-release ] ; then
        DIST='Mandrake'
        PSUEDONAME=`cat /etc/mandrake-release | sed s/.*\(// | sed s/\)//`
        REV=`cat /etc/mandrake-release | sed s/.*release\ // | sed s/\ .*//`
    elif [ -f /etc/os-release ]; then
	DIST=`awk -F "PRETTY_NAME=" '{print $2}' /etc/os-release | tr -d '\n"'`
    elif [ -f /etc/debian_version ] ; then
        DIST="Debian `cat /etc/debian_version`"
        REV=""

    fi
    if ${OSSTR} [ -f /etc/UnitedLinux-release ] ; then
        DIST="${DIST}[`cat /etc/UnitedLinux-release | tr "\n" ' ' | sed s/VERSION.*//`]"
    fi

    OSSTR="${OS} ${DIST} ${REV}(${PSUEDONAME} ${KERNEL} ${MACH})"

fi

##################################
#cat /etc/os-release | grep 'NAME\|VERSION' | grep -v 'VERSION_ID' | grep -v 'PRETTY_NAME' > /tmp/osrelease
#echo -n -e '\E[32m'"OS Name :" $tecreset  && cat /tmp/osrelease | grep -v "VERSION" | grep -v CPE_NAME | cut -f2 -d\"
#echo -n -e '\E[32m'"OS Version :" $tecreset && cat /tmp/osrelease | grep -v "NAME" | grep -v CT_VERSION | cut -f2 -d\"
echo -e '\E[32m'"OS Version :" $tecreset $OSSTR 
# Check Architecture
architecture=$(uname -m)
echo -e '\E[32m'"Architecture :" $tecreset $architecture

# Check Kernel Release
kernelrelease=$(uname -r)
echo -e '\E[32m'"Kernel Release :" $tecreset $kernelrelease

# Check hostname
echo -e '\E[32m'"Hostname :" $tecreset $HOSTNAME

# Check Internal IP
internalip=$(hostname -I)
echo -e '\E[32m'"Internal IP :" $tecreset $internalip

# Check External IP
externalip=$(dig +short myip.opendns.com @resolver1.opendns.com)
echo -e '\E[32m'"External IP : $tecreset "$externalip

# Check DNS
nameservers=$(cat /etc/resolv.conf | sed '1 d' | awk '{print $2}')
echo -e '\E[32m'"Name Servers :" $tecreset $nameservers 

# Check Logged In Users
who>/tmp/who
echo -e '\E[32m'"Logged In users :" $tecreset && cat /tmp/who 

# Check RAM and SWAP Usages
free -h | grep -v + > /tmp/ramcache
echo -e '\E[32m'"Ram Usages :" $tecreset
cat /tmp/ramcache | grep -v "Swap"
echo -e '\E[32m'"Swap Usages :" $tecreset
cat /tmp/ramcache | grep -v "Mem"

# Check Disk Usages
df -h| grep 'Filesystem\|/dev/sda*' > /tmp/diskusage
echo -e '\E[32m'"Disk Usages :" $tecreset 
cat /tmp/diskusage

# Check Load Average
loadaverage=$(top -n 1 -b | grep "load average:" | awk '{print $10 $11 $12}')
echo -e '\E[32m'"Load Average :" $tecreset $loadaverage

# Check System Uptime
tecuptime=$(uptime | awk '{print $3,$4}' | cut -f1 -d,)
echo -e '\E[32m'"System Uptime Days/(HH:MM) :" $tecreset $tecuptime

# Unset Variables
unset tecreset os architecture kernelrelease internalip externalip nameserver loadaverage

# Remove Temporary Files
rm /tmp/who /tmp/ramcache /tmp/diskusage
}
fi
shift $(($OPTIND -1))

Refferences : https://gist.github.com/danigunawan/f2e81b68c56564585707f312c223c260

 

1. Login Di server Katakan Ubuntu server A sebagai user root/user lain (misalkan ubuntu)
sudo su

2. Generate file PEM RSA
ssh-keygen -p -m PEM -f ~/.ssh/id_rsa

3. Buka file private key RSA dan copy di local komputer/server yang lain
cat ~/.ssh/id_rsa > mykey.pem # copykan mykey.pem ke laptop kamu/server lain yang ingin mengakses Ubuntu server A

4. Disable Password Authentication (Optional Jika ingin disable ssh password)

5. Login SSH Ke Ubuntu server A dengan Key PEM dari local laptop/server lain
sudo chmod 600 mykey.pem
ssh -i mykey.pem ubuntu@IP_ADDRESS -p 22