The following packages have unmet dependencies when uninstall gcc [closed]

Я устанавливаю opencv 2.4.5, но он вызывает ту же ошибку, что и на этой странице http://answers.opencv.org/question/21715/usrincludehost_configh822-error-error-unsupported-gnu-version-gcc-47-and-up-are-not-supported/. Чтобы ее исправить, нужно установить gcc 4.6 вместо 4.7 или выше. Но когда я удаляю gcc 4.6 с помощью "sudo apt-get remove ..." или "autoremove", появляется вот такая ошибка:

Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:
The following packages have unmet dependencies:
 dkms : Depends: gcc but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

Вот версия моего gcc:

gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
0
задан 31 May 2017 в 08:44

1 ответ

1) у Вас может быть столько gcc, g ++ версии, сколько Вы хотите, установленный одновременно.

2) Говорят cmake использовать определенный компилятор: CC=gcc-4.6 CXX=g++-4.6 cmake ../

0
ответ дан 3 November 2019 в 04:07

Другие вопросы по тегам:

Похожие вопросы: