UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

取消
显示结果 
搜索替代 
您的意思是: 
Highlighted
Xilinx Employee
Xilinx Employee
83 次查看
注册日期: ‎02-15-2012

【分享】 安装petalinux需要的软件包遇到错误,“requested an impossible situation”。

在Ubuntu 16.04下,安装petalinux需要的软件包遇到错误,“requested an impossible situation”。安装Ubuntu 16.04时,选择的地区是上海。据说选择香港不会有这个问题。

 

user@:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
$ uname -a 
Linux 4.15.0-48-generic #51~16.04.1-Ubuntu SMP Fri Apr 5 12:01:12 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

user@:~$ sudo apt install zlib1g:i386
Reading package lists... Done
Building dependency tree 
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:
mount : PreDepends: libblkid1 (>= 2.17.2) but it is not going to be installed
PreDepends: libmount1 (>= 2.25) but it is not going to be installed
zlib1g:i386 : Depends: libc6:i386 (>= 2.4) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

在网页https://blog.csdn.net/H_O_W_E/article/details/81879319提到,用香港的源可以解决问题。我在/etc/apt/source.list里使用香港源(hk.archive.ubuntu.com)或者新加坡源(sg.archive.ubuntu.com),依然遇到同样问题。

 

 

deb http://hk.archive.ubuntu.com/ubuntu/ xenial main restricted
# deb http://sg.archive.ubuntu.com/ubuntu/ xenial main restricted
# deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted

deb http://hk.archive.ubuntu.com/ubuntu/ xenial universe
# deb http://sg.archive.ubuntu.com/ubuntu/ xenial universe
# deb http://cn.archive.ubuntu.com/ubuntu/ xenial universe

deb http://hk.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://sg.archive.ubuntu.com/ubuntu/ xenial multiverse
# deb http://cn.archive.ubuntu.com/ubuntu/ xenial multiverse

 

更改为清华的源后,可以正常安装。在文件/etc/apt/source.list里增加下列行。

# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security multiverse

然后执行sudo apt-get update,再重新安装,可以正常安装petalinux需要的软件包。

下面是Ubutnu 16.04下安装petalinux的所有软件包的命令。

sudo apt-get install -y tofrodos iproute2 gawk xvfb gcc-4.8 wget \
build-essential checkinstall libreadline-gplv2-dev \
libncursesw5-dev libssl-dev libsqlite3-dev tk-dev \
libgdbm-dev libc6-dev libbz2-dev git make net-tools libncurses5-dev \
tftpd zlib1g-dev libssl-dev flex bison libselinux1 gnupg diffstat \
chrpath socat xterm autoconf libtool tar unzip texinfo \
gcc-multilib libsdl1.2-dev libglib2.0-dev screen pax gzip \
language-pack-en libtool-bin cpio lib32z1 lsb-release zlib1g:i386 \
vim-common libgtk2.0-dev libstdc++6:i386 libc6:i386