Ubuntu 20.02에 libqt4-dev를 설치하는 방법

Ubuntu 20.02에 libqt4-dev를 설치하는 방법

Ubuntu 20.04에 설치 하려고 하는데 libqt4-dev다음 오류가 발생합니다.

kjs@PC:~/Downloads$ sudo apt-get install -y libqt4-dev
Reading package lists... Done
Building dependency tree... 50%
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libqt4-dev : Depends: libqt4-dbus (= 5:4.8.7+dfsg-7ubuntu4rock7) but it is not going to be installed
              Depends: libqt4-declarative (= 5:4.8.7+dfsg-7ubuntu4rock7) but it is not going to be installed
              Depends: libqt4-designer (= 5:4.8.7+dfsg-7ubuntu4rock7) but it is not going to be installed
              Depends: libqt4-dev-bin (= 5:4.8.7+dfsg-7ubuntu4rock7)
              Depends: libqt4-help (= 5:4.8.7+dfsg-7ubuntu4rock7) but it is not going to be installed
              Depends: libqt4-network (= 5:4.8.7+dfsg-7ubuntu4rock7) but it is not going to be installed
              Depends: libqt4-qt3support (= 5:4.8.7+dfsg-7ubuntu4rock7) but it is not going to be installed
              Depends: libqt4-script (= 5:4.8.7+dfsg-7ubuntu4rock7) but it is not going to be installed
              Depends: libqt4-scripttools (= 5:4.8.7+dfsg-7ubuntu4rock7) but it is not going to be installed
              Depends: libqt4-sql (= 5:4.8.7+dfsg-7ubuntu4rock7) but it is not going to be installed
              Depends: libqt4-svg (= 5:4.8.7+dfsg-7ubuntu4rock7) but it is not going to be installed
              Depends: libqt4-test (= 5:4.8.7+dfsg-7ubuntu4rock7) but it is not going to be installed
              Depends: libqt4-xml (= 5:4.8.7+dfsg-7ubuntu4rock7) but it is not going to be installed
              Depends: libqt4-xmlpatterns (= 5:4.8.7+dfsg-7ubuntu4rock7) but it is not going to be installed
              Depends: libqtcore4 (= 5:4.8.7+dfsg-7ubuntu4rock7) but it is not going to be installed
              Depends: libqtgui4 (= 5:4.8.7+dfsg-7ubuntu4rock7) but it is not going to be installed
              Depends: qt4-linguist-tools (= 5:4.8.7+dfsg-7ubuntu4rock7)
              Depends: qt4-qmake (= 5:4.8.7+dfsg-7ubuntu4rock7)
              Depends: qtchooser (>= 55-gc9562a1-1~)
              Recommends: libqt4-opengl-dev (= 5:4.8.7+dfsg-7ubuntu4rock7) but it is not going to be installed
 libqtgui4:i386 : Depends: libpng12-0:i386 (>= 1.2.13-4) but it is not going to be installed
                  Recommends: qt-at-spi:i386 but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

그 후 나는 다음을 시도했습니다.

sudo add-apt-repository ppa:rock-core/qt4 
sudo apt-get update
sudo apt-get install libqtcore4

다음과 같은 오류가 발생했습니다.

~$ sudo apt-get install libqtcore4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libqtcore4 : Breaks: libqtcore4:i386 (!= 5:4.8.7+dfsg-7ubuntu4rock7) but 4:4.8.7+dfsg-5ubuntu2 is to be installed
 libqtcore4:i386 : Breaks: libqtcore4 (!= 4:4.8.7+dfsg-5ubuntu2) but 5:4.8.7+dfsg-7ubuntu4rock7 is to be installed
 libqtgui4:i386 : Depends: libpng12-0:i386 (>= 1.2.13-4) but it is not going to be installed
                  Recommends: qt-at-spi:i386 but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

또한 다음을 사용하여 Qt5 설치를 시도했습니다.

sudo apt-get install git g++ python libeigen3-dev zlib1g-dev libqt5opengl5-dev libqt5svg5-dev libgl1-mesa-dev libfftw3-dev libtiff5-dev libpng-dev

다음과 같은 오류가 발생했습니다.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
g++ is already the newest version (4:9.3.0-1ubuntu2).
g++ set to manually installed.
libpng-dev is already the newest version (1.6.37-2).
git is already the newest version (1:2.25.1-1ubuntu3.10).
libgl1-mesa-dev is already the newest version (21.2.6-0ubuntu0.1~20.04.2).
libgl1-mesa-dev set to manually installed.
zlib1g-dev is already the newest version (1:1.2.11.dfsg-2ubuntu1.5).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libfftw3-dev : Depends: libfftw3-bin (= 3.3.8-2ubuntu1)
                Depends: libfftw3-double3 (= 3.3.8-2ubuntu1) but it is not going to be installed
                Depends: libfftw3-long3 (= 3.3.8-2ubuntu1) but it is not going to be installed
                Depends: libfftw3-quad3 (= 3.3.8-2ubuntu1) but it is not going to be installed
 libqt5opengl5-dev : Depends: libqt5opengl5 (= 5.12.8+dfsg-0ubuntu2.1) but it is not going to be installed
                     Depends: qtbase5-dev (= 5.12.8+dfsg-0ubuntu2.1)
 libqt5svg5-dev : Depends: libqt5svg5 (= 5.12.8-0ubuntu1) but it is not going to be installed
 libqtgui4:i386 : Depends: libpng12-0:i386 (>= 1.2.13-4) but it is not going to be installed
                  Recommends: qt-at-spi:i386 but it is not going to be installed
 python : PreDepends: python-minimal (= 2.7.11-1) but it is not going to be installed
          Depends: python2.7 (>= 2.7.11-1~) but it is not going to be installed
          Depends: libpython-stdlib (= 2.7.11-1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

답변1

Ubuntu 20.04는 공식 저장소에서 qt4모든 종속성을 제거합니다. libqt4-*이 PPA 저장소를 시스템에 추가하면 문제가 해결될 수 있습니다.

sudo add-apt-repository ppa:rock-core/qt4
sudo apt-get update

그런 다음 qt4.

sudo apt-get install libqtcore4

관련 정보