我正在尝试为课程下载 gnucobol,但无法让它工作。我尝试了论坛上的一些方法(install -f 等),但仍然没有成功 :( 我刚刚开始学习使用终端/ubuntu 等。
以下是我得到的结果:
~$ sudo apt-get install gnucobol
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
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:
libcob5-dev : Breaks: libcob4-dev but 3.1.2-5 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
答案1
首次运行sudo apt update
然后sudo apt full-upgrade
应用所有可用的升级。
然后,libcob5-dev
用删除sudo apt remove --autoremove libcob5-dev
。
然后使用以下命令安装 Cobol 编译器sudo apt-get install gnucobol