Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
$ make
Package alsa was not found in the pkg-config search path.
Perhaps you should add the directory containing `alsa.pc'
to the PKG_CONFIG_PATH environment variable
No package 'alsa' found
Package freetype2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `freetype2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'freetype2' found
Package webkit2gtk-4.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `webkit2gtk-4.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'webkit2gtk-4.0' found
Package gtk+-x11-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-x11-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-x11-3.0' found
Package alsa was not found in the pkg-config search path.
Perhaps you should add the directory containing `alsa.pc'
to the PKG_CONFIG_PATH environment variable
No package 'alsa' found
Package freetype2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `freetype2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'freetype2' found
Package webkit2gtk-4.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `webkit2gtk-4.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'webkit2gtk-4.0' found
Package gtk+-x11-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-x11-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-x11-3.0' found
Makefile:174: recipe for target 'check-pkg-config' failed
make: *** [check-pkg-config] Error 1
Code:
$ sudo apt install libasound2
Reading package lists... Done
Building dependency tree
Reading state information... Done
libasound2 is already the newest version (1.1.3-5ubuntu0.1).
The following packages were automatically installed and are no longer required:
linux-headers-4.15.0-1091-oem linux-image-4.15.0-1091-oem linux-modules-4.15.0-1091-oem linux-oem-headers-4.15.0-1091
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
Code:
$ sudo apt-get install libasound2-dev
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:
libasound2-dev : Depends: libasound2 (= 1.1.3-5)
E: Unable to correct problems, you have held broken packages.
Using Ubuntu 18.04. I did run sudo apt-get update before running the above commands.
$ sudo apt-get remove libasound2
After this operation, 4,032 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
?] yes
Abort.
Should I continue this removal?
Code:
$ cat /etc/apt/sources.list
# deb cdrom:[Ubuntu 18.04 _Bionic_ - Build amd64 LIVE Binary 20180608-09:38]/ bionic main
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://in.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://in.archive.ubuntu.com/ubuntu/ bionic main restricted
## Major bug fix updates produced after the final release of the
## distribution.
# deb-src http://in.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://in.archive.ubuntu.com/ubuntu/ bionic universe
# deb-src http://in.archive.ubuntu.com/ubuntu/ bionic universe
# deb-src http://in.archive.ubuntu.com/ubuntu/ bionic-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://in.archive.ubuntu.com/ubuntu/ bionic multiverse
# deb-src http://in.archive.ubuntu.com/ubuntu/ bionic multiverse
# deb-src http://in.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb-src http://in.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse
deb http://archive.canonical.com/ bionic partner
# deb-src http://archive.canonical.com/ bionic partner
$
How to install packages in Debian / Ubuntu when broken packages are reported:
The "apt fix command" is option -f
Code:
sudo apt install -f
Code:
$ sudo apt install -f libasound2
Reading package lists... Done
Building dependency tree
Reading state information... Done
libasound2 is already the newest version (1.1.3-5ubuntu0.1).
The following packages were automatically installed and are no longer required:
linux-headers-4.15.0-1091-oem linux-image-4.15.0-1091-oem linux-modules-4.15.0-1091-oem linux-oem-headers-4.15.0-1091
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
Code:
$ sudo apt install -f libasound2-dev
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:
libasound2-dev : Depends: libasound2 (= 1.1.3-5)
E: Unable to correct problems, you have held broken packages.
I think you have something mixed in /etc/apt/sources.list. Otherwise libasound2 and libasound2-dev cannot conflict with each other.
We cannot help you without knowing how it was really configured.
You may try to force install libasound2 1.1.3-5 but I'm not really sure if it was even a good idea.
The "fix command" is '$ sudo apt install -f ' with no argument / package name.
$ sudo apt install -f libasound2, $ sudo apt install -f libasound2-dev
... are wrong commands.
-
Code:
$ sudo apt install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-4.15.0-1091-oem linux-image-4.15.0-1091-oem linux-modules-4.15.0-1091-oem linux-oem-headers-4.15.0-1091
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
Code:
$ sudo apt install libasound2-dev
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:
libasound2-dev : Depends: libasound2 (= 1.1.3-5)
E: Unable to correct problems, you have held broken packages.
Code:
$ sudo apt install libasound2
Reading package lists... Done
Building dependency tree
Reading state information... Done
libasound2 is already the newest version (1.1.3-5ubuntu0.1).
The following packages were automatically installed and are no longer required:
linux-headers-4.15.0-1091-oem linux-image-4.15.0-1091-oem linux-modules-4.15.0-1091-oem linux-oem-headers-4.15.0-1091
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
repeating the same thing does not help. You could already read the man page of apt to find out how can you force [re]install a package using a given version.
your apt configuration is still wrong (at least it looks like), I think first you must fix that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.