Can't install libpam when compiling OpenWrt

I compile openwrt,get errors:

mkdir openwrt
sudo chmod 777 openwrt
cd openwrt
git clone https://github.com/openwrt/openwrt.git source
cd source
./scripts/feeds update -a
./scripts/feeds install -a
make defconfig

WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a build dependency on 'libpam', which does not exist
WARNING: Makefile 'package/boot/kexec-tools/Makefile' has a dependency on 'liblzma', which does not exist
WARNING: Makefile 'package/network/services/lldpd/Makefile' has a dependency on 'libnetsnmp', which does not exist
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a build dependency on 'libpam', which does not exist
#
# No change to .config
#

Try to install it:

~/openwrt/source$  ./scripts/feeds install  libpam  liblzma 
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a build dependency on 'libpam', which does not exist
WARNING: Makefile 'package/boot/kexec-tools/Makefile' has a dependency on 'liblzma', which does not exist
WARNING: Makefile 'package/network/services/lldpd/Makefile' has a dependency on 'libnetsnmp', which does not exist
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a build dependency on 'libpam', which does not exist
WARNING: No feed for package 'libpam' found
WARNING: No feed for package 'liblzma' found

How to fix then?

1 Like

Try:

./scripts/feeds update -i -f
./scripts/feeds install -a -f

This will reindex and force install packages which might have moved. This can happen if you are switching between branches where packages moved in and out of the core packages.

2 Likes

Hello Grommish, I also get this Error and I tried your Idea, but its not work. I still get this error.

$ ./scripts/feeds update -a
...
$ ./scripts/feeds update -i -f
...
$ ./scripts/feeds install -a -f
Collecting package info: done
Installing all packages from feed packages.
Overriding core package 'ksmbd' with version from packages
Overriding core package 'libcap' with version from packages
WARNING: Not overriding core package 'libcap'; use -f to force
Installing all packages from feed luci.
Installing all packages from feed routing.
Installing all packages from feed telephony.

:frowning:

@MickZ: that warning comes from scripts/feeds, see:

sub is_core_src($) {
	my $src = shift;
	foreach my $file ("tmp/info/.packageinfo-$src", glob("tmp/info/.packageinfo-*_$src")) {
		next unless index($file, "tmp/info/.packageinfo-feeds_");
		return 1 if -s $file;
	}
	return 0;
}

It may be a false positive in case your tmp/info/ contains outdated data.

Solution: rm -r tmp/

Still getting the WARNING

That isn't to neccsary to compile. Also, when you git clone the source, it will automatically create a directory "openwrt"

https://openwrt.org/docs/guide-developer/toolchain/use-buildsystem