Why can't I install libc6-dev - c

I want to compile a c file, but an error occurs after entering the compile command.
~$ gcc helloworld.c -o helloworld
fatal error: stdio.h: No such file or directory
compilation terminated.
I installed libc6-dev according to the method on the Internet
~$ sudo apt install libc6-dev
Then this error appeared
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:
libc6-dev : Depends: libc6 (= 2.23-0ubuntu11.3) but 2.31-0ubuntu9.2 is to be installed
Depends: libc-dev-bin (= 2.23-0ubuntu11.3)
E: Unable to correct problems, you have held broken packages.
So I followed the method
sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
sudo apt-get update
Hit:1 http://archive.canonical.com/ubuntu xenial InRelease
Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease
Hit:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit:5 http://archive.ubuntu.com/ubuntu xenial-security InRelease
Reading package lists... Done
sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
ubuntu-advantage-tools
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
sudo apt-get -u dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
ubuntu-advantage-tools
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
sudo dpkg --configure -a
sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
sudo apt-get install libc6-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:
libc6-i386 : Depends: libc6 (= 2.23-0ubuntu11.3) but 2.31-0ubuntu9.2 is to be installed
E: Unable to correct problems, you have held broken packages.
What should I do

I have debian, but I think this solution can help you. This is the new line I added to my /etc/apt/sources.list
deb http://ftp.it.debian.org/debian bullseye-updates main contrib non-free

Related

How to list/download the recursive BUILD dependencies of a debian package?

I've recently learned that one can use apt to download sources and easily amend, re-build, and install the package locally from Cinnamon volume step and media keys.
# Download the sources
apt source cinnamon-settings-daemon
cd cinnamon-settings-daemon-4.4.0+tricia
# Then install the build dependencies
apt build-dep cinnamon-settings-daemon
#Then build from the modified sources
apt build
Install the modified deb file (again note the version string may differ for different Cinnamon versions)
apt deb ~/cinnamon-settings-daemon_4.4.0+tricia_amd64.deb
I now also want to be able to just download all packages needed for apt build-dep as for binary package install How to list/download the recursive dependencies of a debian package?. However, when I've tried to use --download-only and then install debs files, it resulted in several other files needed:
The following additional packages will be installed:
libarchive-cpio-perl libcupsfilters-dev libicu66:i386 libltdl-dev
libmail-sendmail-perl libpng-tools libpulse0:i386 libsys-hostname-long-perl
Even $ apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances cinnamon-settings-daemon | grep "^\w" | sort -u does not list e.g. libarchive-cpio-perl and also --download-only when I tried to substitute empty dmkg status file ($(apt-config shell STATUS Dir::State::status)) and downloaded ~500 files, not ~100, that "additional" file(s) is(are) still missing.
Added 1:
I added --no-install-recommends to apt install debs and now only two i386 remained in additional not downloaded:
The following additional packages will be installed:
libicu66:i386 libpulse0:i386
Any idea what is so special about them? These are the only i386 mentioned, 1st one listed in apt cache above. 2nd not listed, so combining two deb sets is not a way to solve.
I downloaded debs with dpkg status file corresponding to a system with less packages installed than one where I tried to install later. I assumed it ensures all required are downloaded. However, as I received an answer after facing same issue with regular (not build, sources) packages, it is not so: https://unix.stackexchange.com/a/684975/446998. Additionally installed packages included some i386 architecture packages with corresponding amd64 packages among downloaded debs, so i386 required upgrade too when amd64 were installed as needed to be kept in sync.

Yocto Package have unmet dependencies while installing deb file

I want to install ws-rtsp-proxy_1.8-4_armhf.deb in my armhf7 board
while doing this I got the error. But I have all the dependencies which I have attached below.
root#rt-work:~# apt-get install ./ws-rtsp-proxy_1.8-4_armhf.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
ws-rtsp-proxy : Depends: libgcc1 (>= 1:3.5) but linaro-7.2-r2017.11 is installed
Depends: libssl1.0.0 (>= 1.0.0) but it is not installable
Depends: systemd but it is not installable
E: Unmet dependencies. Try using -f.
But libgcc and libssl1 are already there as you can see:
root#rt-work:~# dpkg --list | grep -i "libgcc1"
ii libgcc1 linaro-7.2-r2017.11 armhf GNU cc ands
root#rt-work:~# dpkg --list | grep -i "libssl*"
ii libss2 1.43.5-r0 armhf Ext2 Filess
ii libssl1.0.2 1.0.2n-r0 armhf Secure Socr
ii libssp-dev linaro-7.2-r2017.11 armhf GNU stack s
ii libssp0 linaro-7.2-r2017.11 armhf
uname -a
Linux rt-work 4.4.138-cip25-yocto-standard #3 SMP PREEMPT Fri Feb 7 12:29:37 IST 2020 armv7l armv7l armv7l GNU/Linux
Version: 2.1.0
Poky (Yocto Project Reference Distro) 2.4.2
How could I solve the issue?
Edit
I download the ws-rtsp-proxy_1.8-4_armhf.deb from this site-->https://streamedian.com/ and i try to install it in my armhf board. The deb i have downloaded is Raspbian 9.3(.deb)
or libgcc and libssl are already present in my rootfs

18.04 gcc a simple c program

appear
functionTest01.c:1:19: fatal error: stdio.h: No such file or directory #include <stdio.h>
when i see friends suggestion。sudo apt-get install libc6-dev
appear
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:
libc6-dev : Depends: libc6 (= 2.23-0ubuntu11) but 2.27-3ubuntu1 is to be installed
Depends: libc-dev-bin (= 2.23-0ubuntu11)
E: Unable to correct problems, you have held broken packages.

how to install xlibs-dev on Ubuntu 10.04 (lucid)?

I'm trying to install V4L2 on Ubuntu 10.04 (lucid) that require the xlibs-devinstalled. I tried: sudo apt-get install xlibs-dev but it returns:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package xlibs-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package xlibs-dev has no installation candidate
then I tried:
First attempt: attemp:sudo apt-get install xorg-dev;
Second attemp: sudo apt-get update and sudo apt-get upgrade;
All failed. same install xorg-dev,updated and upgraded my packages, can't to install the xlibs-dev library. how to fix this? thanks in advance.
The command
apt-cache search xlib dev
suggest you to
aptitude install libx11-dev
And your distribution might have V4L2. Consider installing the v4l2ucp package...
PS. There is no s letter in xlib because it is one library, not several!

opencv install folder on ubuntu

I installed opencv2.3 on ubuntu by first adding the ppa and the doing apt-get install
$ sudo add-apt-repository ppa:gijzelaar/cuda
$ sudo add-apt-repository ppa:gijzelaar/opencv2.3
$ sudo apt-get update
$ sudo apt-get install libopencv-dev
I am developing on Eclipse and my programs work. I have this one problem though, while following an ebook. I cannot find the /opencv/samples folder in my system. I did a unix directory search to no avail.
Also, in Synaptic Package Manager I find that the opencv packages are not marked green, ie they're not installed. However I have written and executed opencv codes on my machine.
What is the reason for this?
It seems you have installed binary OpenCV package while the samples are (most likely) included only to source package.

Resources