고쳐 쓰다

고쳐 쓰다

업무용으로 새 노트북을 샀는데 이제 망했어요 ㅋㅋㅋ LVM과 필요한 모든 것이 포함된 데비안 11을 설치했습니다.

내가 어떻게 이런 상황에 빠졌습니까?

내 독 설정을 제외하면 모든 것이 완벽합니다. 간단히 말해서: 모든 것을 시도한 것 같지만 동료가 동일한 하드웨어를 사용할 수 있음에도 불구하고 내 노트북과 두 개의 외부 모니터에서 작동하도록 DisplayLink 설정을 얻을 수 없습니다. 최고 해상도로 인터레이스만 있는 화면이 있는데 DisplayLink가 더 이상 필요하지 않다는 것을 알게 되었고, 5.18.0-3-amd64해당 영역에서 더 많은 지원이 있다는 것을 읽고 커널 버전으로 업그레이드를 시도했습니다. 나는 팔로우한다이 가이드. 세 번째 모니터에서는 작동하지 않지만 이제 인터레이스 없이 최고 해상도를 사용할 수 있습니다. 그것은 나에게 충분합니다.

그러나 apt를 사용하여 무언가를 설치하려고 할 때마다 몇 가지 문제가 발생한다는 것을 알았습니다. 방금 데비안의 불안정한 소스의 주석 처리를 제거해 보았더니 효과가 있었습니다 하하

그러나 지금? apt는 많은 제거를 시도합니다. 0.5GB를 삭제하려고 합니다. 나는 그것을 구글링하여 이것이 이러면 안 된다는 것을 알았고, 자세히 살펴보았는데 그 안에 그놈과 다른 중요한 것들이 있습니다. 나는 ofc를 중단했고 그것이 커널 업그레이드인 줄 알았습니다(데비안에서 제공하는 최신 버전은 이기 때문입니다 5.10.0-16-amd64)

다운그레이드 가이드를 찾으려고 합니다. " "를 실행하고 apt install --fix-broken아직 설치되어 있는 이전 커널로 재부팅했는데 데스크톱 환경이 아닌 콘솔에 있는 것을 발견했습니다. 해당 패키지가 모두 제거되었습니다. :) 이제는 dpkg를 포함하여 아무것도 설치할 수 없습니다. dpkg의 데이터베이스가 파괴되나요?

또한: linux-headers-5.18.0-3-common_5.18.14-1_all.debVirtualBox에 필요하고 apt와 작동하도록 할 수 없었기 때문에 dpkg를 사용하여 모든 종속 항목을 수동으로 설치했습니다. 그래서 방금 시도했는데 작동했습니다. 이것이 어떤 식으로든 방해가 되는지 모르겠습니다.

실수

검색하고 시도했지만 지금 무엇을 해야할지 전혀 몰랐습니다. 설치/업그레이드 측면에서 시도한 모든 결과는 다음과 같습니다.

The following packages have unmet dependencies:
 libtext-charwidth-perl: Depends: perlapi-5.34.0 but it is not installable
 libtext-iconv-perl: Depends: perlapi-5.34.0 but it is not installable
 perl: Breaks: perl-modules-5.24 but 5.24.1-3+deb9u7 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

솔직히 말해서, 나는 그것이 무엇을 의미하는지조차 모릅니다. 더 많이 조사할수록 더 혼란스러워졌습니다. 지금은 Google에 무엇을 해야할지조차 모르겠습니다.

내가 시도한 것

다운그레이드. 이것이 내가 해야 할 일인 것 같은데, 어떻게 해야 할지 모르겠습니다. 모든 패키지를 설치 가능한 버전(예: 데비안 11 릴리스의 표준)으로 다운그레이드하는 것을 찾았지만 이에 가까운 것을 찾을 수 없었습니다. "패키지=버전"이라고 적힌 튜토리얼만 찾을 수 있습니다. 나는 이 패키지를 검색했고 perlapi는가상 패키지Perl-base에서 apt 및 wget을 통해 버전 5.34.0 설치를 시도했습니다.https://packages.debian.org/sid/amd64/perl-base/download그리고 dpkg -i

그러나 아트는 이렇게 말했습니다.

E: Version '5.34.0' for 'perl-base' was not found

내 말은... 설치할 수 없다고 하는데 일부 포럼 솔루션에서는 수동으로 설치하라고 합니다. 왜 이 버전이 필요한지조차 모르겠습니다. 저는 표준 적절한 소스와 함께 커널 5.10을 사용하고 있습니다(추가 소스를 추가하고 제거하는 모든 것을 시도했습니다):

deb http://packages.hs-regensburg.de/debian/ bullseye main contrib non-free
deb-src http://packages.hs-regensburg.de/debian/ bullseye main contrib non-free

deb http://security.debian.org/debian-security bullseye-security main contrib non-free
deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free

deb http://deb.debian.org/debian unstable main contrib non-free
deb-src http://deb.debian.org/debian unstable main contrib non-free

dpkg가 말했습니다.

dpkg: regarding perl-base_5.34.0-5_amd64.deb containing perl-base:
 perl-base breaks libfile-spec-perl (<< 3.8000)
  perl provides libfile-spec-perl and is present and installed.

dpkg: error processing archive perl-base_5.34.0-5_amd64.deb (--install):
 instaling perl-base would break perl, and
 deconfiguration is not permitted (--auto-deconfigure might help)
Errors were encountered while processing:
 perl-base_5.34.0-5_amd64.deb

--자동 구성 해제는 도움이 되지 않습니다.

지금은 문제가 무엇인지 잘 모르겠습니다. 나는 완전히 길을 잃었습니다. <:C 아무것도 설치할 수 없으며 "Debian 재설치"도 옵션이 아니라는 점을 명심하십시오. 나는 항상 그것을 다시하지는 ​​않습니다. 필요한 것이 있으면 요청해 주시면 제공하도록 노력하겠습니다.

고쳐 쓰다

저는 Windows에서 SSH와 Putty를 통해 텍스트를 보낼 수 있었습니다(이전에 모든 것을 입력한 상태에서).

추가 정보는 다음과 같습니다. https://pastebin.com/XNKLMRkB

업데이트 2

이러한 종속성 문제를 해결하기 위해 완료되지 않은 apt 명령을 생각해 냈습니다.

apt install libtext-charwidth-perl=0.04-10+b1 perl-base=5.32.1-4+deb11u2 libtext-iconv-perl=1.7-7+b1 perl=5.32.1-4+deb11u2 perl-modules-5.32=5.32.1-4+deb11u2

이것이 내가 얻는 것입니다:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
perl is already the newest version (5.32.1-4+deb11u2).
perl-modules-5.32 is already the newest version (5.32.1-4+deb11u2).
perl-modules-5.32 set to manually installed.
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 perl : Breaks: perl-modules-5.24 but 5.24.1-3+deb9u7 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

어쨌든 Debian 9 5.24가 필요하다고 생각합니다(Stephen Kitt가 이미 지적했듯이. 감사합니다). 간단하게 최신 버전을 사용해 보았는데,막힌이 버전이 완성되었습니다부정적인 우선순위,제거아니면 어떤 식으로든우회로그것. 아무것도 작동하지 않습니다 :C 나는 한발 뒤처진 것 같아요. 앞으로 나아갈 방법을 알아야합니다.

제거 시도 중 dpkg 오류:

dpkg: dependency problems prevent removal of perl-modules-5.24:
 libmailtools-perl depends on libnet-perl; however:
  Package libnet-perl is not installed.
  Package perl-modules-5.24 which provides libnet-perl is to be removed.
  Package perl which provides libnet-perl is not configured yet.
 libmailtools-perl depends on libtest-simple-perl; however:
  Package libtest-simple-perl is not installed.
  Package perl-modules-5.24 which provides libtest-simple-perl is to be removed.
  Package perl which provides libtest-simple-perl is not configured yet.
 libmailtools-perl depends on libnet-perl; however:
  Package libnet-perl is not installed.
  Package perl-modules-5.24 which provides libnet-perl is to be removed.
  Package perl which provides libnet-perl is not configured yet.
 libmailtools-perl depends on libtest-simple-perl; however:
  Package libtest-simple-perl is not installed.
  Package perl-modules-5.24 which provides libtest-simple-perl is to be removed.
  Package perl which provides libtest-simple-perl is not configured yet.
 libhttp-date-perl depends on libtime-local-perl (>= 1.28); however:
  Package libtime-local-perl is not installed.
  Package perl-modules-5.24 which provides libtime-local-perl is to be removed.
  Package perl which provides libtime-local-perl is not configured yet.

dpkg: error processing package perl-modules-5.24 (--remove):
 dependency problems - not removing
Errors were encountered while processing:
 perl-modules-5.24

누락된 모든 패키지를 구성하려고 하면 다음과 같습니다.

dpkg: dependency problems prevent configuration of perl:
 perl depends on perl-base (= 5.32.1-4+deb11u2); however:
  Version of perl-base on system is 5.34.0-5.
 perl-base (5.34.0-5) breaks perl (<< 5.34.0~) and is installed.
  Version of perl to be configured is 5.32.1-4+deb11u2.

dpkg: error processing package perl (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 perl

답변1

나는 상황을 알아낼 수 있었다.

다양한 포럼에서 제안한 대로 예상대로 특정 버전을 지정하여 패키지를 수동으로 다운그레이드해야 했습니다. 다행히 이 경우에는 그 금액이 그리 많지는 않습니다.
그러나 하나의 패키지에는 여전히 문제가 있습니다: perl-modules-5.24

이러한 이유로 apt와 dpgk는 패키지 업그레이드나 제거조차 거부합니다. Perl-모듈-5.24실제로 Debian 9에 속합니다. 따라서 삭제해도 안전하지만 삭제할 수는 없습니다.
다운그레이드도 안되고, 업그레이드도 안되네요.
루프에 갇혀 있지만 다행히 dpkg를 강제할 수 있습니다.

이것이 내가 문제를 해결한 방법입니다.

첫 번째 단계: 기도
다음 단계: 하나님의 도움으로…이 답변, 나는 그 멍청한 패키지를 제거했습니다:

dpkg -r --force-depends perl-modules-5.24

내 /etc/apt/sources.list가 올바른지 확인했습니다.

deb http://packages.hs-regensburg.de/debian/ bullseye main
deb-src http://packages.hs-regensburg.de/debian/ bullseye main

deb http://security.debian.org/debian-security bullseye-security main
deb-src http://security.debian.org/debian-security bullseye-security main

# bullseye-updates, to get updates before a point release is made;
# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
deb http://packages.hs-regensburg.de/debian/ bullseye-updates main
deb-src http://packages.hs-regensburg.de/debian/ bullseye-updates main

그러면 다음을 설치할 수 있습니다.

apt install libtext-charwidth-perl=0.04-10+b1 perl-base=5.32.1-4+deb11u2 libtext-iconv-perl=1.7-7+b1 perl=5.32.1-4+deb11u2 perl-modules-5.32=5.32.1-4+deb11u2

(이전 패키지 중 일부가 이 버전에 이미 설치되어 있다고 들었기 때문에 이 패키지가 모두 필요한 것은 아니지만, 이 단계에서는 확인만 하고 있습니다.)
제거된 패키지의 백업 목록을 살펴봅니다. 설치 후 그들은 돌아왔습니다:

apt install $(cat apt-autoremove-list | awk 'BEGIN {ORS=" "}; {for(i=0;i<=NF;i++){print $i}}')

다행히도 apt와 dpkg는 이제 더 이상 데비안 9 패키지에 대해 걱정할 필요가 없습니다. 무엇이 그들을 이런 상황에 이르게 했는지는 모르겠습니다...

데스크탑 환경으로 다시 재부팅할 수 있었습니다... "my"
gnome을 다시 설치해야 했지만 일부 패키지에서 다시 문제가 발생했습니다.
이번에는 "깨진" 것이 아니라 여전히 불안정한 패키지의 "너무 새로운" 패키지를 가지고 있었습니다. 그래서 올바른 버전을 수동으로 설치하여 이러한 문제를 해결했습니다.

apt policy <package>
apt install <package>=<stable version>

그리고하지만Putty 세션을 통해 gnome을 다시 설치하고 설치 후 내 노트북으로 직접 이동했습니다.
홀리. 8시간이 지나 드디어 잠자리에 들 시간이 되었습니다. 모든 것을 구성하는 데 며칠이 걸렸습니다. 가치. :)

귀하의 기여와 빠른 답변에 감사드립니다!

편집하다:

최신 버전의 패키지를 설치하려고 시도하는 스크립트를 작성했습니다. 앞으로는 조정이 필요할 수도 있지만 제 역할은 다했습니다.

#!/bin/bash

installations=$(apt list --installed)
i="null"
packagesToInstall="";


# changable variables (don't change the ones above here)
debug=0

echo "Notice: Analyze this script's doings first, before you install anything, as apt still claims their CLI interface is not stable"
echo -e "\tAdjust this script if something goes wrong!!!\n\n"

getPackage() {
    parray=(${1//// }) # replace slashes with spaces to convert it into an array

    echo "${parray[0]}"
}

echo "collecting packages to install..."

for attribute in $installations; do
    # skip "Listing... Done"
    if [ "$i" == "null" ]; then
           i=0
           continue
    fi       

    i=$(($i + 1))

    # apt's output pattern upon developing this script:
    #
    # zlib1g-dev/stable,stable-security,now
    # 1:1.2.11.dfsg-2+deb11u1
    # amd64
    # [installed]
    # zlib1g/stable,stable-security,now
    # 1:1.2.11.dfsg-2+deb11u1
    # amd64
    # [installed]


    case "$i" in
        "1")
            package=$(getPackage "$attribute")
            ;;
        "2")
            oldVersion=$attribute
            ;;
        "3")
            architecture=$attribute
            ;;
        "4")
            status=$attribute
            ;;
        "5")
            i=1
            unset "newVersion"
            unset "correctVersion"
            unset "correctVersions"


            # get correct version

            # https://serverfault.com/questions/1073939/debian-11-security-updates-deb-or-security-which-to-choose
            # https://www.linuxheld.de/2021/11/08/upgrade-debian-buster-10-auf-debian-bullseye-11/
            correctVersions=$(apt policy "$package" 2>/dev/null | grep " $(lsb_release -cs)/" -B 1)
            correctVersion=$(echo "$correctVersions" | awk '{print $1}')

            # if a version was found
            if [[ "$correctVersion" != "*"* ]]; then
                #echo "?$correctVersion?"
                correctVersion=($correctVersion) # toArray
                #echo "!$correctVersion!"
                newVersion=${correctVersion[0]}
            fi

            
            if [ "$debug" == 1 ]; then
                echo "package: $package"
                echo "installed version: $oldVersion"
                echo "architecture: $architecture"
                echo "status: $status"
                echo -e "new version: $newVersion\n"
                #echo "$correctVersions"
            fi




            # do actions (install)

            # if there is a new version available to install
            if ! [ -z "$newVersion" ] && [ "$oldVersion" != "$newVersion" ]; then
                packagesToInstall="$packagesToInstall"' '"'$package=$newVersion'"
            fi

            # continue
            package=$(getPackage "$attribute") # 1 from case statement only gets executed the first time
            unset "oldVersion"
            unset "newVersion"
            unset "correctVersion"
            unset "correctVersions"
            continue
            ;;
    esac
    #echo $install | awk '{print $2}'
done

echo -e "installing following packages with versions:\n"

for pti in $packagesToInstall; do
    parray=(${pti//=/ })

    if [ -z "$parray" ]; then
        echo "$pti"
    else
        package="${parray[0]}"
        version="${parray[1]}"

        package=${package#*"'"}
        version=${version%"'"*}

        printf "$package:\t"

        if [ "${#package}" -lt 7 ]; then
            printf "\t\t\t\t"
        elif [ "${#package}" -lt 15 ]; then
            printf "\t\t\t"
        elif [ "${#package}" -lt 23 ]; then
            printf "\t\t"
        elif [ "${#package}" -lt 31 ]; then
            printf "\t"
        fi

        echo "$version"
    fi
done

echo ""
read -p "Install all of these? [Y/n] " userWantsToInstall
userWantsToInstall=${userWantsToInstall,,} # https://stackoverflow.com/questions/1728683/case-insensitive-comparison-of-strings-in-shell-script

# ask before installation
if [ "$userWantsToInstall" == "y" ] || [ -z "$userWantsToInstall" ] || [ "$userWantsToInstall" == "yes" ]; then
    if [ $(whoami) == "root" ]; then
        echo "apt install --yes --force-yes $packagesToInstall"
    else
        echo "sudo apt install --yes --force-yes $packagesToInstall"
    fi
else
    echo -e "\nAborted"
    exit
fi

관련 정보