tteck / Proxmox

Proxmox VE Helper-Scripts
https://Helper-Scripts.com
MIT License
13.4k stars 2.08k forks source link

Photoprism LXC install fails on dependencies if zfs dataset is caseinsensetive #969

Closed 0xE1 closed 1 year ago

0xE1 commented 1 year ago

Describe the issue Running bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/photoprism-v5.sh)" in proxmox, the installation fails on dependencies:

Preparing to unpack .../42-linux-libc-dev_5.10.158-2_amd64.deb ...
Unpacking linux-libc-dev:amd64 (5.10.158-2) ...
dpkg: error processing archive /tmp/apt-dpkg-install-AAck5I/42-linux-libc-dev_5.10.158-2_amd64.deb (--unpack):
 unable to open '/usr/include/linux/netfilter/xt_connmark.h.dpkg-new': No such file or directory
...
Preparing to unpack .../47-manpages-dev_5.10-1_all.deb ...
Unpacking manpages-dev (5.10-1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-AAck5I/47-manpages-dev_5.10-1_all.deb (--unpack):
 unable to open '/usr/share/man/man2/_exit.2.gz.dpkg-new': No such file or directory
Errors were encountered while processing:
 /tmp/apt-dpkg-install-AAck5I/42-linux-libc-dev_5.10.158-2_amd64.deb
 /tmp/apt-dpkg-install-AAck5I/47-manpages-dev_5.10-1_all.deb

‼ ERROR 100@88 Unknown failure occurred.

I've found this post about casesensetivity on proxmox forums that mentions same package https://forum.proxmox.com/threads/fresh-ubuntu-template-20-04-lxc-too-many-levels-of-symbolic-links.103214/ created new zfs dataset and ensured it's set to sensetive, and now the protoprism have installed with out issues. (I think I migrated original dataset from TrueNAS Scale, where it was set to caseinsensetive by default?)

Perhaps some preliminary checks needed to prevent odd-looking error like this?

Screenshots

    ____  __  ______  __________  ____  ____  _________ __  ___
   / __ \/ / / / __ \/_  __/ __ \/ __ \/ __ \/  _/ ___//  |/  /
  / /_/ / /_/ / / / / / / / / / / /_/ / /_/ // / \__ \/ /|_/ /
 / ____/ __  / /_/ / / / / /_/ / ____/ _, _// / v5_/ / /  / /
/_/   /_/ /_/\____/ /_/  \____/_/   /_/ |_/___//____/_/  /_/

Using Advanced Settings
Using Container Type: 0
Using Container Type: 0
Using Root Password: xxxxxx
Using Root Password: xxxxxx
Using Container ID: 102
Using Container ID: 102
Using Hostname: photoprism
Using Hostname: photoprism
Using Disk Size: 16
Allocated Cores: 8
Allocated Cores: 8
Allocated RAM: 8192
Allocated RAM: 8192
Using Bridge: vmbr0
Using Bridge: vmbr0
Using IP Address: dhcp
Using IP Address: dhcp
Using Gateway IP Address: Default
Using Interface MTU Size: Default
Using DNS Search Domain: Host
Using DNS Server IP Address: Host
Using MAC Address: Default
Using MAC Address: Default
Using Vlan: Default
Using Vlan: Default
Enable Root SSH Access: Yes
Enable Root SSH Access: Yes
Enable Verbose Mode: Yes
Enable Verbose Mode: Yes
Creating a PhotoPrism LXC using the above advanced settings
Creating a PhotoPrism LXC using the above advanced settings
+ '[' 0 == 1 ']'
+ FEATURES=nesting=1
++ mktemp -d
+ TEMP_DIR=/tmp/tmp.BWvKRqmJWx
+ pushd /tmp/tmp.BWvKRqmJWx
+ export VERBOSE=yes
+ VERBOSE=yes
+ export STD=
+ STD=
+ export SSH_ROOT=yes
+ SSH_ROOT=yes
+ export CTID=102
+ CTID=102
+ export PCT_OSTYPE=debian
+ PCT_OSTYPE=debian
+ export PCT_OSVERSION=11
+ PCT_OSVERSION=11
+ export PCT_DISK_SIZE=16
+ PCT_DISK_SIZE=16
+ export 'PCT_OPTIONS=
  -features nesting=1
  -hostname photoprism

  -net0 name=eth0,bridge=vmbr0,ip=dhcp
  -onboot 1
  -cores 8
  -memory 8192
  -unprivileged 0
  -password xxxxxx
'
+ PCT_OPTIONS='
  -features nesting=1
  -hostname photoprism

  -net0 name=eth0,bridge=vmbr0,ip=dhcp
  -onboot 1
  -cores 8
  -memory 8192
  -unprivileged 0
  -password xxxxxx
'
++ wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh
+ bash -c '#!/usr/bin/env bash
if [ "$VERBOSE" == "yes" ]; then set -x; fi
YW=$(echo "\033[33m")
BL=$(echo "\033[36m")
RD=$(echo "\033[01;31m")
GN=$(echo "\033[1;92m")
CL=$(echo "\033[m")
CM="${GN}✓${CL}"
CROSS="${RD}✗${CL}"
BFR="\\r\\033[K"
HOLD="-"

function msg_info() {
  local msg="$1"
  echo -ne " ${HOLD} ${YW}${msg}..."
}

function msg_ok() {
  local msg="$1"
  echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
}
function msg_error() {
  local msg="$1"
  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
}

msg_info "Validating Storage"
VALIDCT=$(pvesm status -content rootdir | awk '\''NR>1'\'')
if [ -z "$VALIDCT" ]; then
  msg_error "Unable to detect a valid Container Storage location."
  exit 1
fi
VALIDTMP=$(pvesm status -content vztmpl | awk '\''NR>1'\'')
if [ -z "$VALIDTMP" ]; then
  msg_error "Unable to detect a valid Template Storage location."
  exit 1
fi

set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
shopt -s expand_aliases
alias die='\''EXIT=$? LINE=$LINENO error_exit'\''
trap die ERR

function error_exit() {
  trap - ERR
  local reason="Unknown failure occurred."
  local msg="${1:-$reason}"
  local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE"
  echo -e "$flag $msg" 1>&2
  exit $EXIT
}

function select_storage() {
  local CLASS=$1
  local CONTENT
  local CONTENT_LABEL
  case $CLASS in
  container)
    CONTENT='\''rootdir'\''
    CONTENT_LABEL='\''Container'\''
    ;;
  template)
    CONTENT='\''vztmpl'\''
    CONTENT_LABEL='\''Container template'\''
    ;;
  *) false || die "Invalid storage class." ;;
  esac

  local -a MENU
  while read -r line; do
    local TAG=$(echo $line | awk '\''{print $1}'\'')
    local TYPE=$(echo $line | awk '\''{printf "%-10s", $2}'\'')
    local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '\''{printf( "%9sB", $6)}'\'')
    local ITEM="  Type: $TYPE Free: $FREE "
    local OFFSET=2
    if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then
      local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET))
    fi
    MENU+=("$TAG" "$ITEM" "OFF")
  done < <(pvesm status -content $CONTENT | awk '\''NR>1'\'')

  if [ $((${#MENU[@]} / 3)) -eq 1 ]; then
    printf ${MENU[0]}
  else
    local STORAGE
    while [ -z "${STORAGE:+x}" ]; do
      STORAGE=$(whiptail --title "Storage Pools" --radiolist \
        "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \
        16 $(($MSG_MAX_LENGTH + 23)) 6 \
        "${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted."
    done
    printf $STORAGE
  fi
}

[[ "${CTID:-}" ]] || die "You need to set '\''CTID'\'' variable."
[[ "${PCT_OSTYPE:-}" ]] || die "You need to set '\''PCT_OSTYPE'\'' variable."

[ "$CTID" -ge "100" ] || die "ID cannot be less than 100."

if pct status $CTID &>/dev/null; then
  echo -e "ID '\''$CTID'\'' is already in use."
  unset CTID
  die "Cannot use ID that is already in use."
fi

TEMPLATE_STORAGE=$(select_storage template) || exit
msg_ok "Using ${BL}$TEMPLATE_STORAGE${CL} ${GN}for Template Storage."

CONTAINER_STORAGE=$(select_storage container) || exit
msg_ok "Using ${BL}$CONTAINER_STORAGE${CL} ${GN}for Container Storage."

msg_info "Updating LXC Template List"
pveam update >/dev/null
msg_ok "Updated LXC Template List"

TEMPLATE_SEARCH=${PCT_OSTYPE}-${PCT_OSVERSION:-}
mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V)
[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '\''$TEMPLATE_SEARCH'\''."
TEMPLATE="${TEMPLATES[-1]}"

if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then
  msg_info "Downloading LXC Template"
  pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null ||
    die "A problem occured while downloading the LXC template."
  msg_ok "Downloaded LXC Template"
fi

DEFAULT_PCT_OPTIONS=(
  -arch $(dpkg --print-architecture))

PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}})
[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8})

msg_info "Creating LXC Container"
pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null ||
  die "A problem occured while trying to create container."
msg_ok "LXC Container ${BL}$CTID${CL} ${GN}was successfully created."'
++ echo '\033[33m'
+ YW='\033[33m'
++ echo '\033[36m'
+ BL='\033[36m'
++ echo '\033[01;31m'
+ RD='\033[01;31m'
++ echo '\033[1;92m'
+ GN='\033[1;92m'
++ echo '\033[m'
+ CL='\033[m'
+ CM='\033[1;92m✓\033[m'
+ CROSS='\033[01;31m✗\033[m'
+ BFR='\r\033[K'
+ HOLD=-
+ msg_info 'Validating Storage'
+ local 'msg=Validating Storage'
+ echo -ne ' - \033[33mValidating Storage...'
 - Validating Storage...++ pvesm status -content rootdir
++ awk 'NR>1'
+ VALIDCT='local-zfs     zfspool     active     15560888613       687402946     14873485666    4.42%'
+ '[' -z 'local-zfs     zfspool     active     15560888613       687402946     14873485666    4.42%' ']'
++ pvesm status -content vztmpl
++ awk 'NR>1'
+ VALIDTMP='local         dir     active        30271428        18312232        10396164   60.49%'
+ '[' -z 'local         dir     active        30271428        18312232        10396164   60.49%' ']'
+ set -o errexit
+ set -o errtrace
+ set -o nounset
+ set -o pipefail
+ shopt -s expand_aliases
+ alias 'die=EXIT=$? LINE=$LINENO error_exit'
+ trap die ERR
+ [[ -n 102 ]]
+ [[ -n debian ]]
+ '[' 102 -ge 100 ']'
+ pct status 102
++ select_storage template
++ local CLASS=template
++ local CONTENT
++ local CONTENT_LABEL
++ case $CLASS in
++ CONTENT=vztmpl
++ CONTENT_LABEL='Container template'
++ local -a MENU
++ read -r line
+++ pvesm status -content vztmpl
+++ awk 'NR>1'
+++ echo local dir active 30271428 18312236 10396160 60.49%
+++ awk '{print $1}'
++ local TAG=local
+++ echo local dir active 30271428 18312236 10396160 60.49%
+++ awk '{printf "%-10s", $2}'
++ local 'TYPE=dir       '
+++ echo local dir active 30271428 18312236 10396160 60.49%
+++ numfmt --field 4-6 --from-unit=K --to=iec --format %.2f
+++ awk '{printf( "%9sB", $6)}'
++ local 'FREE=    9.69GB'
++ local 'ITEM=  Type: dir        Free:     9.69GB '
++ local OFFSET=2
++ [[ 38 -gt '' ]]
++ local MSG_MAX_LENGTH=38
++ MENU+=("$TAG" "$ITEM" "OFF")
++ read -r line
++ '[' 1 -eq 1 ']'
++ printf local
+ TEMPLATE_STORAGE=local
+ msg_ok 'Using \033[36mlocal\033[m \033[1;92mfor Template Storage.'
+ local 'msg=Using \033[36mlocal\033[m \033[1;92mfor Template Storage.'
+ echo -e '\r\033[K \033[1;92m✓\033[m \033[1;92mUsing \033[36mlocal\033[m \033[1;92mfor Template Storage.\033[m'
 ✓ Using local for Template Storage.
++ select_storage container
++ local CLASS=container
++ local CONTENT
++ local CONTENT_LABEL
++ case $CLASS in
++ CONTENT=rootdir
++ CONTENT_LABEL=Container
++ local -a MENU
++ read -r line
+++ pvesm status -content rootdir
+++ awk 'NR>1'
+++ echo local-zfs zfspool active 15560888613 687402946 14873485666 4.42%
+++ awk '{print $1}'
++ local TAG=local-zfs
+++ echo local-zfs zfspool active 15560888613 687402946 14873485666 4.42%
+++ awk '{printf "%-10s", $2}'
++ local 'TYPE=zfspool   '
+++ echo local-zfs zfspool active 15560888613 687402946 14873485666 4.42%
+++ awk '{printf( "%9sB", $6)}'
+++ numfmt --field 4-6 --from-unit=K --to=iec --format %.2f
++ local 'FREE=   13.53TB'
++ local 'ITEM=  Type: zfspool    Free:    13.53TB '
++ local OFFSET=2
++ [[ 38 -gt '' ]]
++ local MSG_MAX_LENGTH=38
++ MENU+=("$TAG" "$ITEM" "OFF")
++ read -r line
++ '[' 1 -eq 1 ']'
++ printf local-zfs
+ CONTAINER_STORAGE=local-zfs
+ msg_ok 'Using \033[36mlocal-zfs\033[m \033[1;92mfor Container Storage.'
+ local 'msg=Using \033[36mlocal-zfs\033[m \033[1;92mfor Container Storage.'
+ echo -e '\r\033[K \033[1;92m✓\033[m \033[1;92mUsing \033[36mlocal-zfs\033[m \033[1;92mfor Container Storage.\033[m'
 ✓ Using local-zfs for Container Storage.
+ msg_info 'Updating LXC Template List'
+ local 'msg=Updating LXC Template List'
+ echo -ne ' - \033[33mUpdating LXC Template List...'
 - Updating LXC Template List...+ pveam update
+ msg_ok 'Updated LXC Template List'
+ local 'msg=Updated LXC Template List'
+ echo -e '\r\033[K \033[1;92m✓\033[m \033[1;92mUpdated LXC Template List\033[m'
 ✓ Updated LXC Template List
+ TEMPLATE_SEARCH=debian-11
+ mapfile -t TEMPLATES
++ pveam available -section system
++ sed -n 's/.*\(debian-11.*\)/\1/p'
++ sort -t - -k 2 -V
+ '[' 1 -gt 0 ']'
+ TEMPLATE=debian-11-standard_11.6-1_amd64.tar.zst
+ pveam list local
+ grep -q debian-11-standard_11.6-1_amd64.tar.zst
+ DEFAULT_PCT_OPTIONS=(-arch $(dpkg --print-architecture))
++ dpkg --print-architecture
+ PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}})
+ [[  -features nesting=1 -hostname photoprism -net0 name=eth0,bridge=vmbr0,ip=dhcp -onboot 1 -cores 8 -memory 8192 -unprivileged 0 -password xxxxxx  =~  -rootfs  ]]
+ PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8})
+ msg_info 'Creating LXC Container'
+ local 'msg=Creating LXC Container'
+ echo -ne ' - \033[33mCreating LXC Container...'
 - Creating LXC Container...+ pct create 102 local:vztmpl/debian-11-standard_11.6-1_amd64.tar.zst -features nesting=1 -hostname photoprism -net0 name=eth0,bridge=vmbr0,ip=dhcp -onboot 1 -cores 8 -memory 8192 -unprivileged 0 -password xxxxxx -rootfs local-zfs:16
+ msg_ok 'LXC Container \033[36m102\033[m \033[1;92mwas successfully created.'
+ local 'msg=LXC Container \033[36m102\033[m \033[1;92mwas successfully created.'
+ echo -e '\r\033[K \033[1;92m✓\033[m \033[1;92mLXC Container \033[36m102\033[m \033[1;92mwas successfully created.\033[m'
 ✓ LXC Container 102 was successfully created.
+ msg_info 'Starting LXC Container'
+ local 'msg=Starting LXC Container'
+ echo -ne ' - \033[33mStarting LXC Container...'
 - Starting LXC Container...+ pct start 102
+ msg_ok 'Started LXC Container'
+ local 'msg=Started LXC Container'
+ echo -e '\r\033[K \033[1;92m✓\033[m \033[1;92mStarted LXC Container\033[m'
 ✓ Started LXC Container
++ wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/photoprism-v5-install.sh
+ lxc-attach -n 102 -- bash -c '#!/usr/bin/env bash
if [ "$VERBOSE" == "yes" ]; then set -x; fi
AVX=$(grep -o -m1 '\''avx[^ ]*'\'' /proc/cpuinfo)
YW=$(echo "\033[33m")
RD=$(echo "\033[01;31m")
BL=$(echo "\033[36m")
GN=$(echo "\033[1;92m")
CL=$(echo "\033[m")
RETRY_NUM=10
RETRY_EVERY=3
NUM=$RETRY_NUM
CM="${GN}✓${CL}"
CROSS="${RD}✗${CL}"
BFR="\\r\\033[K"
HOLD="-"
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
shopt -s expand_aliases
alias die='\''EXIT=$? LINE=$LINENO error_exit'\''
trap die ERR
silent() { "$@" > /dev/null 2>&1; }
function error_exit() {
  trap - ERR
  local reason="Unknown failure occurred."
  local msg="${1:-$reason}"
  local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE"
  echo -e "$flag $msg" 1>&2
  exit $EXIT
}

function msg_info() {
  local msg="$1"
  echo -ne " ${HOLD} ${YW}${msg}..."
}

function msg_ok() {
  local msg="$1"
  echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
}

function msg_error() {
  local msg="$1"
  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
}

msg_info "Setting up Container OS "
sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
locale-gen >/dev/null
while [ "$(hostname -I)" = "" ]; do
  echo 1>&2 -en "${CROSS}${RD} No Network! "
  sleep $RETRY_EVERY
  ((NUM--))
  if [ $NUM -eq 0 ]; then
    echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
    exit 1
  fi
done
msg_ok "Set up Container OS"
msg_ok "Network Connected: ${BL}$(hostname -I)"

set +e
alias die='\'''\''
if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else
  msg_error "Internet NOT Connected"
    read -r -p "Would you like to continue anyway? <y/N> " prompt
    if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
      echo -e " ⚠️  ${RD}Expect Issues Without Internet${CL}"
    else
      echo -e " 🖧  Check Network Settings"
      exit 1
    fi
fi
RESOLVEDIP=$(nslookup "github.com" | awk -F'\'':'\'' '\''/^Address: / { matched = 1 } matched { print $2}'\'' | xargs)
if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi
alias die='\''EXIT=$? LINE=$LINENO error_exit'\''
set -e

msg_info "Updating Container OS"
$STD apt-get update
$STD apt-get -y upgrade
msg_ok "Updated Container OS"

msg_info "Installing Dependencies (Patience)"
$STD apt-get install -y curl
$STD apt-get install -y sudo
$STD apt-get install -y gcc
$STD apt-get install -y g++
$STD apt-get install -y git
$STD apt-get install -y gnupg
$STD apt-get install -y make
$STD apt-get install -y zip
$STD apt-get install -y unzip
$STD apt-get install -y exiftool
$STD apt-get install -y ffmpeg
msg_ok "Installed Dependencies"

msg_info "Setting up Node.js Repository"
$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x)
msg_ok "Set up Node.js Repository"

msg_info "Installing Node.js"
$STD apt-get -y install nodejs
msg_ok "Installed Node.js"

msg_info "Installing Golang (Patience)"
$STD wget https://golang.org/dl/go1.19.3.linux-amd64.tar.gz
$STD tar -xzf go1.19.3.linux-amd64.tar.gz -C /usr/local
$STD ln -s /usr/local/go/bin/go /usr/local/bin/go
$STD go install github.com/tianon/gosu@latest
$STD go install golang.org/x/tools/cmd/goimports@latest
$STD go install github.com/psampaz/go-mod-outdated@latest
$STD go install github.com/dsoprea/go-exif/v3/command/exif-read-tool@latest
$STD go install github.com/mikefarah/yq/v4@latest
$STD go install github.com/kyoh86/richgo@latest
cp /root/go/bin/* /usr/local/go/bin/
cp /usr/local/go/bin/richgo /usr/local/bin/richgo
cp /usr/local/go/bin/gosu /usr/local/sbin/gosu
chown root:root /usr/local/sbin/gosu
chmod 755 /usr/local/sbin/gosu
msg_ok "Installed Golang"

msg_info "Installing Tensorflow"
if [[ "$AVX" =~ avx2 ]]; then
 $STD wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-avx2-1.15.2.tar.gz
 $STD tar -C /usr/local -xzf libtensorflow-linux-avx2-1.15.2.tar.gz
elif [[ "$AVX" =~ avx ]]; then
 $STD wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-avx-1.15.2.tar.gz
 $STD tar -C /usr/local -xzf libtensorflow-linux-avx-1.15.2.tar.gz
else
 $STD wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-cpu-1.15.2.tar.gz
 $STD tar -C /usr/local -xzf libtensorflow-linux-cpu-1.15.2.tar.gz
fi
$STD ldconfig
msg_ok "Installed Tensorflow"

msg_info "Cloning PhotoPrism"
mkdir -p /opt/photoprism/bin
mkdir -p /var/lib/photoprism/storage
$STD git clone https://github.com/photoprism/photoprism.git
cd photoprism
$STD git checkout release
msg_ok "Cloned PhotoPrism"

msg_info "Building PhotoPrism (Patience)"
$STD make -B
$STD ./scripts/build.sh prod /opt/photoprism/bin/photoprism
$STD cp -r assets/ /opt/photoprism/
msg_ok "Built PhotoPrism"

env_path="/var/lib/photoprism/.env"
echo "
PHOTOPRISM_AUTH_MODE='\''password'\''
PHOTOPRISM_ADMIN_PASSWORD='\''changeme'\''
PHOTOPRISM_HTTP_HOST='\''0.0.0.0'\''
PHOTOPRISM_HTTP_PORT='\''2342'\''
PHOTOPRISM_SITE_CAPTION='\''https://tteck.github.io/Proxmox/'\''
PHOTOPRISM_STORAGE_PATH='\''/var/lib/photoprism/storage'\''
PHOTOPRISM_ORIGINALS_PATH='\''/var/lib/photoprism/photos/Originals'\''
PHOTOPRISM_IMPORT_PATH='\''/var/lib/photoprism/photos/Import'\''
" >$env_path

msg_info "Creating Service"
service_path="/etc/systemd/system/photoprism.service"

echo "[Unit]
Description=PhotoPrism service
After=network.target

[Service]
Type=forking
User=root
WorkingDirectory=/opt/photoprism
EnvironmentFile=/var/lib/photoprism/.env
ExecStart=/opt/photoprism/bin/photoprism up -d
ExecStop=/opt/photoprism/bin/photoprism down

[Install]
WantedBy=multi-user.target" >$service_path
msg_ok "Created Service"

PASS=$(grep -w "root" /etc/shadow | cut -b6)
if [[ $PASS != $ ]]; then
  msg_info "Customizing Container"
  rm /etc/motd
  rm /etc/update-motd.d/10-uname
  touch ~/.hushlogin
  GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf"
  mkdir -p $(dirname $GETTY_OVERRIDE)
  cat <<EOF >$GETTY_OVERRIDE
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM
EOF
  systemctl daemon-reload
  systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed '\''s/\.d//'\'')
  msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
  sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
  systemctl restart sshd
fi

msg_info "Cleaning up"
$STD apt-get autoremove
$STD apt-get autoclean
rm -rf /var/{cache,log}/* \
  /photoprism \
  /go1.19.3.linux-amd64.tar.gz \
  /libtensorflow-linux-avx2-1.15.2.tar.gz \
  /libtensorflow-linux-avx-1.15.2.tar.gz \
  /libtensorflow-linux-cpu-1.15.2.tar.gz
msg_ok "Cleaned"

msg_info "Starting PhotoPrism"
$STD systemctl enable --now photoprism
msg_ok "Started PhotoPrism"'
++ grep -o -m1 'avx[^ ]*' /proc/cpuinfo
+ AVX='avx
avx2'
++ echo '\033[33m'
+ YW='\033[33m'
++ echo '\033[01;31m'
+ RD='\033[01;31m'
++ echo '\033[36m'
+ BL='\033[36m'
++ echo '\033[1;92m'
+ GN='\033[1;92m'
++ echo '\033[m'
+ CL='\033[m'
+ RETRY_NUM=10
+ RETRY_EVERY=3
+ NUM=10
+ CM='\033[1;92m✓\033[m'
+ CROSS='\033[01;31m✗\033[m'
+ BFR='\r\033[K'
+ HOLD=-
+ set -o errexit
+ set -o errtrace
+ set -o nounset
+ set -o pipefail
+ shopt -s expand_aliases
+ alias 'die=EXIT=$? LINE=$LINENO error_exit'
+ trap die ERR
+ msg_info 'Setting up Container OS '
+ local 'msg=Setting up Container OS '
+ echo -ne ' - \033[33mSetting up Container OS ...'
 - Setting up Container OS ...+ sed -i '/en_US.UTF-8/ s/\(^# \)//' /etc/locale.gen
+ locale-gen
++ hostname -I
+ '[' '' = '' ']'
+ echo -en '\033[01;31m✗\033[m\033[01;31m No Network! '
✗ No Network! + sleep 3
+ (( NUM-- ))
+ '[' 9 -eq 0 ']'
++ hostname -I
+ '[' '10.0.0.204 xxxx:xx:xxxx:xxxx:xx:xxxx:xxxx:xxxx ' = '' ']'
+ msg_ok 'Set up Container OS'
+ local 'msg=Set up Container OS'
+ echo -e '\r\033[K \033[1;92m✓\033[m \033[1;92mSet up Container OS\033[m'
 ✓ Set up Container OS
++ hostname -I
+ msg_ok 'Network Connected: \033[36m10.0.0.204 xxxx:xx:xxxx:xxxx:xx:xxxx:xxxx:xxxx '
+ local 'msg=Network Connected: \033[36m10.0.0.204 xxxx:xx:xxxx:xxxx:xx:xxxx:xxxx:xxxx '
+ echo -e '\r\033[K \033[1;92m✓\033[m \033[1;92mNetwork Connected: \033[36m10.0.0.204 xxxx:xx:xxxx:xxxx:xx:xxxx:xxxx:xxxx \033[m'
 ✓ Network Connected: 10.0.0.204 xxxx:xx:xxxx:xxxx:xx:xxxx:xxxx:xxxx
+ set +e
+ alias die=
+ nc -zw1 8.8.8.8 443
+ msg_ok 'Internet Connected'
+ local 'msg=Internet Connected'
+ echo -e '\r\033[K \033[1;92m✓\033[m \033[1;92mInternet Connected\033[m'
 ✓ Internet Connected
++ nslookup github.com
++ xargs
++ awk -F: '/^Address: / { matched = 1 } matched { print $2}'
+ RESOLVEDIP=140.82.121.4
+ [[ -z 140.82.121.4 ]]
+ msg_ok 'DNS Resolved github.com to 140.82.121.4'
+ local 'msg=DNS Resolved github.com to 140.82.121.4'
+ echo -e '\r\033[K \033[1;92m✓\033[m \033[1;92mDNS Resolved github.com to 140.82.121.4\033[m'
 ✓ DNS Resolved github.com to 140.82.121.4
+ alias 'die=EXIT=$? LINE=$LINENO error_exit'
+ set -e
+ msg_info 'Updating Container OS'
+ local 'msg=Updating Container OS'
+ echo -ne ' - \033[33mUpdating Container OS...'
 - Updating Container OS...+ apt-get update
Get:1 http://security.debian.org bullseye-security InRelease [48.4 kB]
Get:2 http://deb.debian.org/debian bullseye InRelease [116 kB]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:4 http://security.debian.org bullseye-security/main amd64 Packages [214 kB]
Get:5 http://deb.debian.org/debian bullseye/main Translation-en [6,240 kB]
Get:6 http://security.debian.org bullseye-security/main Translation-en [140 kB]
Get:7 http://deb.debian.org/debian bullseye/contrib Translation-en [46.9 kB]
Get:8 http://deb.debian.org/debian bullseye-updates/main Translation-en [7,929 B]
Fetched 6,857 kB in 2s (2,979 kB/s)
Reading package lists... Done
+ apt-get -y upgrade
Reading package lists... Done
Building dependency tree... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+ msg_ok 'Updated Container OS'
+ local 'msg=Updated Container OS'
+ echo -e '\r\033[K \033[1;92m✓\033[m \033[1;92mUpdated Container OS\033[m'
 ✓ Updated Container OS
+ msg_info 'Installing Dependencies (Patience)'
+ local 'msg=Installing Dependencies (Patience)'
+ echo -ne ' - \033[33mInstalling Dependencies (Patience)...'
 - Installing Dependencies (Patience)...+ apt-get install -y curl
Reading package lists... Done
Building dependency tree... Done
The following additional packages will be installed:
  libcurl4
The following NEW packages will be installed:
  curl libcurl4
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 615 kB of archives.
After this operation, 1,196 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main amd64 libcurl4 amd64 7.74.0-1.3+deb11u3 [345 kB]
Get:2 http://deb.debian.org/debian bullseye/main amd64 curl amd64 7.74.0-1.3+deb11u3 [269 kB]
Fetched 615 kB in 0s (2,452 kB/s)
Selecting previously unselected package libcurl4:amd64.
(Reading database ... 19030 files and directories currently installed.)
Preparing to unpack .../libcurl4_7.74.0-1.3+deb11u3_amd64.deb ...
Unpacking libcurl4:amd64 (7.74.0-1.3+deb11u3) ...
Selecting previously unselected package curl.
Preparing to unpack .../curl_7.74.0-1.3+deb11u3_amd64.deb ...
Unpacking curl (7.74.0-1.3+deb11u3) ...
Setting up libcurl4:amd64 (7.74.0-1.3+deb11u3) ...
Setting up curl (7.74.0-1.3+deb11u3) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for libc-bin (2.31-13+deb11u5) ...
+ apt-get install -y sudo
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  sudo
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,061 kB of archives.
After this operation, 4,699 kB of additional disk space will be used.
Get:1 http://security.debian.org bullseye-security/main amd64 sudo amd64 1.9.5p2-3+deb11u1 [1,061 kB]
Fetched 1,061 kB in 0s (4,670 kB/s)
Selecting previously unselected package sudo.
(Reading database ... 19045 files and directories currently installed.)
Preparing to unpack .../sudo_1.9.5p2-3+deb11u1_amd64.deb ...
Unpacking sudo (1.9.5p2-3+deb11u1) ...
Setting up sudo (1.9.5p2-3+deb11u1) ...
Processing triggers for man-db (2.9.4-2) ...
+ apt-get install -y gcc
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  binutils binutils-common binutils-x86-64-linux-gnu cpp cpp-10 fontconfig-config fonts-dejavu-core gcc-10 libasan6
  libatomic1 libbinutils libc-dev-bin libc-devtools libc6-dev libcc1-0 libcrypt-dev libctf-nobfd0 libctf0 libdeflate0
  libfontconfig1 libfreetype6 libgcc-10-dev libgd3 libgomp1 libisl23 libitm1 libjbig0 libjpeg62-turbo liblsan0 libmpc3
  libmpfr6 libnsl-dev libpng16-16 libquadmath0 libtiff5 libtirpc-dev libtsan0 libubsan1 libwebp6 libx11-6 libx11-data
  libxau6 libxcb1 libxdmcp6 libxpm4 linux-libc-dev manpages-dev
Suggested packages:
  binutils-doc cpp-doc gcc-10-locales gcc-multilib make autoconf automake libtool flex bison gdb gcc-doc
  gcc-10-multilib gcc-10-doc glibc-doc libgd-tools
The following NEW packages will be installed:
  binutils binutils-common binutils-x86-64-linux-gnu cpp cpp-10 fontconfig-config fonts-dejavu-core gcc gcc-10
  libasan6 libatomic1 libbinutils libc-dev-bin libc-devtools libc6-dev libcc1-0 libcrypt-dev libctf-nobfd0 libctf0
  libdeflate0 libfontconfig1 libfreetype6 libgcc-10-dev libgd3 libgomp1 libisl23 libitm1 libjbig0 libjpeg62-turbo
  liblsan0 libmpc3 libmpfr6 libnsl-dev libpng16-16 libquadmath0 libtiff5 libtirpc-dev libtsan0 libubsan1 libwebp6
  libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxpm4 linux-libc-dev manpages-dev
0 upgraded, 48 newly installed, 0 to remove and 0 not upgraded.
Need to get 53.2 MB of archives.
After this operation, 190 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main amd64 binutils-common amd64 2.35.2-2 [2,220 kB]
Get:2 http://deb.debian.org/debian bullseye/main amd64 libbinutils amd64 2.35.2-2 [570 kB]
Get:3 http://deb.debian.org/debian bullseye/main amd64 libctf-nobfd0 amd64 2.35.2-2 [110 kB]
Get:4 http://deb.debian.org/debian bullseye/main amd64 libctf0 amd64 2.35.2-2 [53.2 kB]
Get:5 http://deb.debian.org/debian bullseye/main amd64 binutils-x86-64-linux-gnu amd64 2.35.2-2 [1,809 kB]
Get:6 http://deb.debian.org/debian bullseye/main amd64 binutils amd64 2.35.2-2 [61.2 kB]
Get:7 http://deb.debian.org/debian bullseye/main amd64 libisl23 amd64 0.23-1 [676 kB]
Get:8 http://deb.debian.org/debian bullseye/main amd64 libmpfr6 amd64 4.1.0-3 [2,012 kB]
Get:9 http://deb.debian.org/debian bullseye/main amd64 libmpc3 amd64 1.2.0-1 [45.0 kB]
Get:10 http://deb.debian.org/debian bullseye/main amd64 cpp-10 amd64 10.2.1-6 [8,528 kB]
Get:11 http://deb.debian.org/debian bullseye/main amd64 cpp amd64 4:10.2.1-1 [19.7 kB]
Get:12 http://deb.debian.org/debian bullseye/main amd64 fonts-dejavu-core all 2.37-2 [1,069 kB]
Get:13 http://deb.debian.org/debian bullseye/main amd64 fontconfig-config all 2.13.1-4.2 [281 kB]
Get:14 http://deb.debian.org/debian bullseye/main amd64 libcc1-0 amd64 10.2.1-6 [47.0 kB]
Get:15 http://deb.debian.org/debian bullseye/main amd64 libgomp1 amd64 10.2.1-6 [99.9 kB]
Get:16 http://deb.debian.org/debian bullseye/main amd64 libitm1 amd64 10.2.1-6 [25.8 kB]
Get:17 http://deb.debian.org/debian bullseye/main amd64 libatomic1 amd64 10.2.1-6 [9,008 B]
Get:18 http://deb.debian.org/debian bullseye/main amd64 libasan6 amd64 10.2.1-6 [2,065 kB]
Get:19 http://deb.debian.org/debian bullseye/main amd64 liblsan0 amd64 10.2.1-6 [828 kB]
Get:20 http://deb.debian.org/debian bullseye/main amd64 libtsan0 amd64 10.2.1-6 [2,000 kB]
Get:21 http://deb.debian.org/debian bullseye/main amd64 libubsan1 amd64 10.2.1-6 [777 kB]
Get:22 http://deb.debian.org/debian bullseye/main amd64 libquadmath0 amd64 10.2.1-6 [145 kB]
Get:23 http://deb.debian.org/debian bullseye/main amd64 libgcc-10-dev amd64 10.2.1-6 [2,328 kB]
Get:24 http://deb.debian.org/debian bullseye/main amd64 gcc-10 amd64 10.2.1-6 [17.0 MB]
Get:25 http://deb.debian.org/debian bullseye/main amd64 gcc amd64 4:10.2.1-1 [5,192 B]
Get:26 http://deb.debian.org/debian bullseye/main amd64 libc-dev-bin amd64 2.31-13+deb11u5 [276 kB]
Get:27 http://deb.debian.org/debian bullseye/main amd64 libpng16-16 amd64 1.6.37-3 [294 kB]
Get:28 http://deb.debian.org/debian bullseye/main amd64 libfreetype6 amd64 2.10.4+dfsg-1+deb11u1 [418 kB]
Get:29 http://deb.debian.org/debian bullseye/main amd64 libfontconfig1 amd64 2.13.1-4.2 [347 kB]
Get:30 http://deb.debian.org/debian bullseye/main amd64 libjpeg62-turbo amd64 1:2.0.6-4 [151 kB]
Get:31 http://deb.debian.org/debian bullseye/main amd64 libdeflate0 amd64 1.7-1 [53.1 kB]
Get:32 http://deb.debian.org/debian bullseye/main amd64 libjbig0 amd64 2.1-3.1+b2 [31.0 kB]
Get:33 http://deb.debian.org/debian bullseye/main amd64 libwebp6 amd64 0.6.1-2.1 [258 kB]
Get:34 http://deb.debian.org/debian bullseye/main amd64 libtiff5 amd64 4.2.0-1+deb11u1 [289 kB]
Get:35 http://deb.debian.org/debian bullseye/main amd64 libxau6 amd64 1:1.0.9-1 [19.7 kB]
Get:36 http://deb.debian.org/debian bullseye/main amd64 libxdmcp6 amd64 1:1.1.2-3 [26.3 kB]
Get:37 http://deb.debian.org/debian bullseye/main amd64 libxcb1 amd64 1.14-3 [140 kB]
Get:38 http://deb.debian.org/debian bullseye/main amd64 libx11-data all 2:1.7.2-1 [311 kB]
Get:39 http://deb.debian.org/debian bullseye/main amd64 libx11-6 amd64 2:1.7.2-1 [772 kB]
Get:40 http://deb.debian.org/debian bullseye/main amd64 libxpm4 amd64 1:3.5.12-1 [49.1 kB]
Get:41 http://deb.debian.org/debian bullseye/main amd64 libgd3 amd64 2.3.0-2 [137 kB]
Get:42 http://deb.debian.org/debian bullseye/main amd64 libc-devtools amd64 2.31-13+deb11u5 [246 kB]
Get:43 http://deb.debian.org/debian bullseye/main amd64 linux-libc-dev amd64 5.10.158-2 [1,571 kB]
Get:44 http://deb.debian.org/debian bullseye/main amd64 libcrypt-dev amd64 1:4.4.18-4 [104 kB]
Get:45 http://deb.debian.org/debian bullseye/main amd64 libtirpc-dev amd64 1.3.1-1+deb11u1 [191 kB]
Get:46 http://deb.debian.org/debian bullseye/main amd64 libnsl-dev amd64 1.3.0-2 [66.4 kB]
Get:47 http://deb.debian.org/debian bullseye/main amd64 libc6-dev amd64 2.31-13+deb11u5 [2,359 kB]
Get:48 http://deb.debian.org/debian bullseye/main amd64 manpages-dev all 5.10-1 [2,309 kB]
Fetched 53.2 MB in 5s (10.5 MB/s)
Extracting templates from packages: 100%
Preconfiguring packages ...
Selecting previously unselected package binutils-common:amd64.
(Reading database ... 19184 files and directories currently installed.)
Preparing to unpack .../00-binutils-common_2.35.2-2_amd64.deb ...
Unpacking binutils-common:amd64 (2.35.2-2) ...
Selecting previously unselected package libbinutils:amd64.
Preparing to unpack .../01-libbinutils_2.35.2-2_amd64.deb ...
Unpacking libbinutils:amd64 (2.35.2-2) ...
Selecting previously unselected package libctf-nobfd0:amd64.
Preparing to unpack .../02-libctf-nobfd0_2.35.2-2_amd64.deb ...
Unpacking libctf-nobfd0:amd64 (2.35.2-2) ...
Selecting previously unselected package libctf0:amd64.
Preparing to unpack .../03-libctf0_2.35.2-2_amd64.deb ...
Unpacking libctf0:amd64 (2.35.2-2) ...
Selecting previously unselected package binutils-x86-64-linux-gnu.
Preparing to unpack .../04-binutils-x86-64-linux-gnu_2.35.2-2_amd64.deb ...
Unpacking binutils-x86-64-linux-gnu (2.35.2-2) ...
Selecting previously unselected package binutils.
Preparing to unpack .../05-binutils_2.35.2-2_amd64.deb ...
Unpacking binutils (2.35.2-2) ...
Selecting previously unselected package libisl23:amd64.
Preparing to unpack .../06-libisl23_0.23-1_amd64.deb ...
Unpacking libisl23:amd64 (0.23-1) ...
Selecting previously unselected package libmpfr6:amd64.
Preparing to unpack .../07-libmpfr6_4.1.0-3_amd64.deb ...
Unpacking libmpfr6:amd64 (4.1.0-3) ...
Selecting previously unselected package libmpc3:amd64.
Preparing to unpack .../08-libmpc3_1.2.0-1_amd64.deb ...
Unpacking libmpc3:amd64 (1.2.0-1) ...
Selecting previously unselected package cpp-10.
Preparing to unpack .../09-cpp-10_10.2.1-6_amd64.deb ...
Unpacking cpp-10 (10.2.1-6) ...
Selecting previously unselected package cpp.
Preparing to unpack .../10-cpp_4%3a10.2.1-1_amd64.deb ...
Unpacking cpp (4:10.2.1-1) ...
Selecting previously unselected package fonts-dejavu-core.
Preparing to unpack .../11-fonts-dejavu-core_2.37-2_all.deb ...
Unpacking fonts-dejavu-core (2.37-2) ...
Selecting previously unselected package fontconfig-config.
Preparing to unpack .../12-fontconfig-config_2.13.1-4.2_all.deb ...
Unpacking fontconfig-config (2.13.1-4.2) ...
Selecting previously unselected package libcc1-0:amd64.
Preparing to unpack .../13-libcc1-0_10.2.1-6_amd64.deb ...
Unpacking libcc1-0:amd64 (10.2.1-6) ...
Selecting previously unselected package libgomp1:amd64.
Preparing to unpack .../14-libgomp1_10.2.1-6_amd64.deb ...
Unpacking libgomp1:amd64 (10.2.1-6) ...
Selecting previously unselected package libitm1:amd64.
Preparing to unpack .../15-libitm1_10.2.1-6_amd64.deb ...
Unpacking libitm1:amd64 (10.2.1-6) ...
Selecting previously unselected package libatomic1:amd64.
Preparing to unpack .../16-libatomic1_10.2.1-6_amd64.deb ...
Unpacking libatomic1:amd64 (10.2.1-6) ...
Selecting previously unselected package libasan6:amd64.
Preparing to unpack .../17-libasan6_10.2.1-6_amd64.deb ...
Unpacking libasan6:amd64 (10.2.1-6) ...
Selecting previously unselected package liblsan0:amd64.
Preparing to unpack .../18-liblsan0_10.2.1-6_amd64.deb ...
Unpacking liblsan0:amd64 (10.2.1-6) ...
Selecting previously unselected package libtsan0:amd64.
Preparing to unpack .../19-libtsan0_10.2.1-6_amd64.deb ...
Unpacking libtsan0:amd64 (10.2.1-6) ...
Selecting previously unselected package libubsan1:amd64.
Preparing to unpack .../20-libubsan1_10.2.1-6_amd64.deb ...
Unpacking libubsan1:amd64 (10.2.1-6) ...
Selecting previously unselected package libquadmath0:amd64.
Preparing to unpack .../21-libquadmath0_10.2.1-6_amd64.deb ...
Unpacking libquadmath0:amd64 (10.2.1-6) ...
Selecting previously unselected package libgcc-10-dev:amd64.
Preparing to unpack .../22-libgcc-10-dev_10.2.1-6_amd64.deb ...
Unpacking libgcc-10-dev:amd64 (10.2.1-6) ...
Selecting previously unselected package gcc-10.
Preparing to unpack .../23-gcc-10_10.2.1-6_amd64.deb ...
Unpacking gcc-10 (10.2.1-6) ...
Selecting previously unselected package gcc.
Preparing to unpack .../24-gcc_4%3a10.2.1-1_amd64.deb ...
Unpacking gcc (4:10.2.1-1) ...
Selecting previously unselected package libc-dev-bin.
Preparing to unpack .../25-libc-dev-bin_2.31-13+deb11u5_amd64.deb ...
Unpacking libc-dev-bin (2.31-13+deb11u5) ...
Selecting previously unselected package libpng16-16:amd64.
Preparing to unpack .../26-libpng16-16_1.6.37-3_amd64.deb ...
Unpacking libpng16-16:amd64 (1.6.37-3) ...
Selecting previously unselected package libfreetype6:amd64.
Preparing to unpack .../27-libfreetype6_2.10.4+dfsg-1+deb11u1_amd64.deb ...
Unpacking libfreetype6:amd64 (2.10.4+dfsg-1+deb11u1) ...
Selecting previously unselected package libfontconfig1:amd64.
Preparing to unpack .../28-libfontconfig1_2.13.1-4.2_amd64.deb ...
Unpacking libfontconfig1:amd64 (2.13.1-4.2) ...
Selecting previously unselected package libjpeg62-turbo:amd64.
Preparing to unpack .../29-libjpeg62-turbo_1%3a2.0.6-4_amd64.deb ...
Unpacking libjpeg62-turbo:amd64 (1:2.0.6-4) ...
Selecting previously unselected package libdeflate0:amd64.
Preparing to unpack .../30-libdeflate0_1.7-1_amd64.deb ...
Unpacking libdeflate0:amd64 (1.7-1) ...
Selecting previously unselected package libjbig0:amd64.
Preparing to unpack .../31-libjbig0_2.1-3.1+b2_amd64.deb ...
Unpacking libjbig0:amd64 (2.1-3.1+b2) ...
Selecting previously unselected package libwebp6:amd64.
Preparing to unpack .../32-libwebp6_0.6.1-2.1_amd64.deb ...
Unpacking libwebp6:amd64 (0.6.1-2.1) ...
Selecting previously unselected package libtiff5:amd64.
Preparing to unpack .../33-libtiff5_4.2.0-1+deb11u1_amd64.deb ...
Unpacking libtiff5:amd64 (4.2.0-1+deb11u1) ...
Selecting previously unselected package libxau6:amd64.
Preparing to unpack .../34-libxau6_1%3a1.0.9-1_amd64.deb ...
Unpacking libxau6:amd64 (1:1.0.9-1) ...
Selecting previously unselected package libxdmcp6:amd64.
Preparing to unpack .../35-libxdmcp6_1%3a1.1.2-3_amd64.deb ...
Unpacking libxdmcp6:amd64 (1:1.1.2-3) ...
Selecting previously unselected package libxcb1:amd64.
Preparing to unpack .../36-libxcb1_1.14-3_amd64.deb ...
Unpacking libxcb1:amd64 (1.14-3) ...
Selecting previously unselected package libx11-data.
Preparing to unpack .../37-libx11-data_2%3a1.7.2-1_all.deb ...
Unpacking libx11-data (2:1.7.2-1) ...
Selecting previously unselected package libx11-6:amd64.
Preparing to unpack .../38-libx11-6_2%3a1.7.2-1_amd64.deb ...
Unpacking libx11-6:amd64 (2:1.7.2-1) ...
Selecting previously unselected package libxpm4:amd64.
Preparing to unpack .../39-libxpm4_1%3a3.5.12-1_amd64.deb ...
Unpacking libxpm4:amd64 (1:3.5.12-1) ...
Selecting previously unselected package libgd3:amd64.
Preparing to unpack .../40-libgd3_2.3.0-2_amd64.deb ...
Unpacking libgd3:amd64 (2.3.0-2) ...
Selecting previously unselected package libc-devtools.
Preparing to unpack .../41-libc-devtools_2.31-13+deb11u5_amd64.deb ...
Unpacking libc-devtools (2.31-13+deb11u5) ...
Selecting previously unselected package linux-libc-dev:amd64.
Preparing to unpack .../42-linux-libc-dev_5.10.158-2_amd64.deb ...
Unpacking linux-libc-dev:amd64 (5.10.158-2) ...
dpkg: error processing archive /tmp/apt-dpkg-install-AAck5I/42-linux-libc-dev_5.10.158-2_amd64.deb (--unpack):
 unable to open '/usr/include/linux/netfilter/xt_connmark.h.dpkg-new': No such file or directory
Selecting previously unselected package libcrypt-dev:amd64.
Preparing to unpack .../43-libcrypt-dev_1%3a4.4.18-4_amd64.deb ...
Unpacking libcrypt-dev:amd64 (1:4.4.18-4) ...
Selecting previously unselected package libtirpc-dev:amd64.
Preparing to unpack .../44-libtirpc-dev_1.3.1-1+deb11u1_amd64.deb ...
Unpacking libtirpc-dev:amd64 (1.3.1-1+deb11u1) ...
Selecting previously unselected package libnsl-dev:amd64.
Preparing to unpack .../45-libnsl-dev_1.3.0-2_amd64.deb ...
Unpacking libnsl-dev:amd64 (1.3.0-2) ...
Selecting previously unselected package libc6-dev:amd64.
Preparing to unpack .../46-libc6-dev_2.31-13+deb11u5_amd64.deb ...
Unpacking libc6-dev:amd64 (2.31-13+deb11u5) ...
Selecting previously unselected package manpages-dev.
Preparing to unpack .../47-manpages-dev_5.10-1_all.deb ...
Unpacking manpages-dev (5.10-1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-AAck5I/47-manpages-dev_5.10-1_all.deb (--unpack):
 unable to open '/usr/share/man/man2/_exit.2.gz.dpkg-new': No such file or directory
Errors were encountered while processing:
 /tmp/apt-dpkg-install-AAck5I/42-linux-libc-dev_5.10.158-2_amd64.deb
 /tmp/apt-dpkg-install-AAck5I/47-manpages-dev_5.10-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
++ EXIT=100
++ LINE=88
++ error_exit
++ trap - ERR
++ local 'reason=Unknown failure occurred.'
++ local 'msg=Unknown failure occurred.'
++ local 'flag=\033[01;31m‼ ERROR \033[m100@88'
++ echo -e '\033[01;31m‼ ERROR \033[m100@88 Unknown failure occurred.'
‼ ERROR 100@88 Unknown failure occurred.
++ exit 100
+ exit
root@proxmox:~#

Bug reports will be closed after 12 hours of NO activity.

tteck commented 1 year ago

Thanks for the info