Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
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.
I haven't personally tried using dpkg or apt on LFS, but I did some research and it looks like you may need to change something in one of the files in /usr/share/dpkg to make dpkg recognize your architecture. Can you paste the contents of /usr/share/dpkg/cputable as well as ostable? Also, what's the output of the following?
Code:
gcc --print-libgcc-file-name
As for your second issue, with apt, the error you got indicates a problem on line 158 of apt.conf. Maybe paste that line along with some context here?
# This file contains the table of known CPU names.
#
# Architecture names are formed as a combination of the system name
# (from ostable) and CPU name (from this table). A list of architecture
# names in the Debian ‘sid’ distribution can be found in the archtable
# file.
#
# Column 1 is the Debian name for the CPU, used to form the architecture
# name.
# Column 2 is the GNU name for the CPU, used to output build and host
# targets in ‘dpkg-architecture’.
# Column 3 is an extended regular expression used to match against the
# CPU part of the output of the GNU config.guess script.
#
# <Debian name> <GNU name> <config.guess regex>
i386 i486 (i[3456]86|pentium)
ia64 ia64 ia64
alpha alpha alpha.*
amd64 x86_64 x86_64
armeb armeb arm.*b
arm arm arm.*
hppa hppa hppa.*
m32r m32r m32r
m68k m68k m68k
mips mips mips(eb)?
mipsel mipsel mipsel
powerpc powerpc (powerpc|ppc)
ppc64 powerpc64 (powerpc|ppc)64
s390 s390 s390
s390x s390x s390x
sh3 sh3 sh3
sh3eb sh3eb sh3eb
sh4 sh4 sh4
sh4eb sh4eb sh4eb
sparc sparc sparc(64)?
ostable
Code:
# This file contains the table of known operating system names.
#
# Architecture names are formed as a combination of the system name
# (from this table) and CPU name (from cputable). A list of architecture
# names in the Debian ‘sid’ distribution can be found in the archtable
# file.
#
# Column 1 is the Debian name for the system, used to form the
# architecture name.
# Column 2 is the GNU name for the system, used to output build and host
# targets in ‘dpkg-architecture’.
# Column 3 is an extended regular expression used to match against the
# system part of the output of the GNU config.guess script.
#
# <Debian name> <GNU name> <config.guess regex>
linux linux-gnu linux[^-]*(-gnu.*)?
darwin darwin darwin[^-]*
freebsd freebsd freebsd[^-]*
kfreebsd kfreebsd-gnu kfreebsd[^-]*(-gnu.*)?
knetbsd knetbsd-gnu knetbsd[^-]*(-gnu.*)?
netbsd netbsd netbsd[^-]*
openbsd openbsd openbsd[^-]*
hurd gnu gnu[^-]*
gcc --print-libgcc-file-name
Code:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.3/libgcc.a
I thought I had typed that in a couple of days ago and got a different output. I think i686 was the only thing that showed up in the output. But I have tried so many different things over the last few days, I might be getting them mixed up.
In the cputable file, try adding the following line:
Code:
i686 i686 (i[3456]86|pentium)
and in ostable, change the "linux" in the first column to "gnu-linux"; hopefully that will fix things.
In apt.conf, the problem is with the line immediately before the one the error actually points to: remove the extra quotation mark right after Verify-Host, before "true"
Odd. I wish I had more experience in this area, but my preferred method for package management in LFS is through package users.
I did find this forum thread that seems to match what you're experiencing; not sure if there's any info there that will help, though it might be worth taking a look. By the way, what's the output of "uname -m" on your system? And which version of dpkg did you install? I know the hint recommends an older version; have you tried installing the latest version to see if that solves the problem?
Weird. When I first installed dpkg, it wouldn't recognize my architecture, no matter what version I used. When I installed dpkg using dpkg, then it would recognize it. So I had to install dpkg, and then install it again using the dpkg that I just installed. I am now using version 1.15.0 and when I type
Code:
dpkg --print-architecture
it shows
Code:
i386
and when I type
Code:
uname -m
it shows
Code:
i686
Now that I've got that figured out, I am getting the following message when I type in "apt-get update"
Code:
Err http://security.debian.org stable/updates Release.gpg
Temporary failure resolving 'security.debian.org'
Err http://security.debian.org stable/updates/main Translation-en_US
Temporary failure resolving 'security.debian.org'
Err http://security.debian.org stable/updates/contrib Translation-en_US
Temporary failure resolving 'security.debian.org'
Err http://security.debian.org stable/updates/non-free Translation-en_US
Temporary failure resolving 'security.debian.org'
Err http://http.us.debian.org stable Release.gpg
Temporary failure resolving 'http.us.debian.org'
Err http://http.us.debian.org stable/main Translation-en_US
Temporary failure resolving 'http.us.debian.org'
Err http://http.us.debian.org stable/contrib Translation-en_US
Temporary failure resolving 'http.us.debian.org'
Err http://http.us.debian.org stable/non-free Translation-en_US
Temporary failure resolving 'http.us.debian.org'
Reading package lists... Done
W: Failed to fetch http://http.us.debian.org/debian/dists/stable/Release.gpg Temporary failure resolving 'http.us.debian.org'
W: Failed to fetch http://http.us.debian.org/debian/dists/stable/main/i18n/Translation-en_US.bz2 Temporary failure resolving 'http.us.debian.org'
W: Failed to fetch http://http.us.debian.org/debian/dists/stable/contrib/i18n/Translation-en_US.bz2 Temporary failure resolving 'http.us.debian.org'
W: Failed to fetch http://http.us.debian.org/debian/dists/stable/non-free/i18n/Translation-en_US.bz2 Temporary failure resolving 'http.us.debian.org'
W: Failed to fetch http://security.debian.org/dists/stable/updates/Release.gpg Temporary failure resolving 'security.debian.org'
W: Failed to fetch http://security.debian.org/dists/stable/updates/main/i18n/Translation-en_US.bz2 Temporary failure resolving 'security.debian.org'
W: Failed to fetch http://security.debian.org/dists/stable/updates/contrib/i18n/Translation-en_US.bz2 Temporary failure resolving 'security.debian.org'
W: Failed to fetch http://security.debian.org/dists/stable/updates/non-free/i18n/Translation-en_US.bz2 Temporary failure resolving 'security.debian.org'
W: Some index files failed to download, they have been ignored, or old ones used instead.
W: You may want to run apt-get update to correct these problems
so now I will play around with my sources.list file to see if I can figure this out.
Interesting solution. So basically using dpkg to bootstrap itself, similar to how GCC winds up compiling itself a couple times in chapter 5.5.
Any luck with the apt-get update problem? From the error messages, it looks like just a temporary networking issue, but I checked those repositories in a browser just now and while the Release.gpg files are there, the english Translation files aren't.
No, so far I haven't had any luck with apt-get update. So far, I can't seem to find a repository that actually works. Is there anyone else that is having this issue, or is it just me? Release.gpg files may be there, but it still "fails to fetch".
Apt works for me on Debian, but still not on LFS. Now I have discovered that I can connect to the internet with LFS, but not use it. The internet dials out and connects, but when I try to load a page, it acts like it is not connected. I can ping IP addresses, but not load web pages. I think this must be why I can't get apt to work, but I don't know how to fix this. Any ideas?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.