LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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


Reply
  Search this Thread
Old 03-06-2009, 08:25 AM   #1
cody0416
LQ Newbie
 
Registered: Feb 2009
Posts: 14

Rep: Reputation: 0
dpkg/apt


Now that I have finished the lfs book, I am trying to install dpkg/apt according to the hint at
http://www.linuxfromscratch.org/hint...files/dpkg.txt
but when I try to install something with dpkg I get

Code:
 package architecture (i386) does not match system ()
How can I make dpkg recognize my system architecture? I know I can use

Code:
--force-architecture
but I don't want to have to do that every time.

I installed apt and edited apt.conf like it said in the hint, but when I type in apt-get update, I get

Code:
E: Syntax error /etc/apt/apt.conf:158: Malformed tag
What does this mean, and how can I fix it?
 
Old 03-07-2009, 05:03 AM   #2
Mystican
Member
 
Registered: May 2007
Location: San Diego, CA
Distribution: LFS, Xubuntu, others
Posts: 59

Rep: Reputation: 17
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?
 
Old 03-07-2009, 10:49 AM   #3
cody0416
LQ Newbie
 
Registered: Feb 2009
Posts: 14

Original Poster
Rep: Reputation: 0
cputable
Code:
# 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.

apt.conf
Code:
  {
	Verify-Peer "false";
	SslCert "/etc/apt/some.pem";
        CaPath  "/etc/ssl/certs";
        Verify-Host" "true";
        AllowRedirect  "true";
  };
line 158 is AllowRedirect "true";

If I comment out that line, then I get the same error on the next line, and then the next.
 
Old 03-08-2009, 04:24 AM   #4
Mystican
Member
 
Registered: May 2007
Location: San Diego, CA
Distribution: LFS, Xubuntu, others
Posts: 59

Rep: Reputation: 17
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"
 
Old 03-08-2009, 04:03 PM   #5
cody0416
LQ Newbie
 
Registered: Feb 2009
Posts: 14

Original Poster
Rep: Reputation: 0
Ok, that fixed my problem with apt, but dpkg still doesn't recognize my architecture. If I type in

Code:
dpkg --print-architecture
it comes back blank. If I try to install something, I still get the same error message as before unless I force it.
 
Old 03-08-2009, 08:45 PM   #6
Mystican
Member
 
Registered: May 2007
Location: San Diego, CA
Distribution: LFS, Xubuntu, others
Posts: 59

Rep: Reputation: 17
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?
 
Old 03-09-2009, 01:45 AM   #7
cody0416
LQ Newbie
 
Registered: Feb 2009
Posts: 14

Original Poster
Rep: Reputation: 0
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.
 
Old 03-09-2009, 09:28 PM   #8
Mystican
Member
 
Registered: May 2007
Location: San Diego, CA
Distribution: LFS, Xubuntu, others
Posts: 59

Rep: Reputation: 17
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.
 
Old 03-09-2009, 10:45 PM   #9
cody0416
LQ Newbie
 
Registered: Feb 2009
Posts: 14

Original Poster
Rep: Reputation: 0
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".
 
Old 03-10-2009, 12:31 AM   #10
Mystican
Member
 
Registered: May 2007
Location: San Diego, CA
Distribution: LFS, Xubuntu, others
Posts: 59

Rep: Reputation: 17
Found this thread, posted today, from someone who seems to be experiencing pretty much the same thing as you are, albeit with a Kubuntu system.

Best recommendation at the moment might be to give it 24 hours or so, hope it's a network issue that will solve itself, and then try again.
 
Old 03-19-2009, 09:48 AM   #11
cody0416
LQ Newbie
 
Registered: Feb 2009
Posts: 14

Original Poster
Rep: Reputation: 0
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?
 
Old 03-19-2009, 11:46 AM   #12
manwichmakesameal
Member
 
Registered: Aug 2006
Distribution: Slackware
Posts: 804

Rep: Reputation: 110Reputation: 110
Can you post your /etc/resolv.conf? Sounds like a dns issue.
 
Old 03-19-2009, 12:41 PM   #13
cody0416
LQ Newbie
 
Registered: Feb 2009
Posts: 14

Original Poster
Rep: Reputation: 0
/etc/resolv.conf

Code:
nameserver 66.133.150.12
nameserver 66.133.170.2
And I don't know what I did, but somehow apt is now working.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
APT/dpkg errors! /var/lib/dpkg/status bassclarinet Debian 16 12-01-2011 10:24 AM
Apt-get, Dpkg Kincaid Debian 3 03-01-2007 08:52 AM
dpkg not working nor apt-get alhaidry Debian 2 08-12-2004 09:45 AM
apt-get/dpkg failure ls3 Debian 3 11-18-2003 03:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 05:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration