LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   dpkg problems ! (https://www.linuxquestions.org/questions/debian-26/dpkg-problems-4175438764/)

k84834 11-26-2012 08:05 AM

dpkg problems !
 
Hi
I am working on LFS. I want to install dpkg and then apt on LFS for package management.
I have installed all packages in LFS book from source. then I installed dpkg-1.15.8.13 with below instructions :
Code:

./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
 --build=i386-gnu-linux --without-dselect
make
make install
touch /var/lib/dpkg/status
touch /var/lib/dpkg/available

and the dpkg package have been installed.
but there are several problems with dpkg:

1st: dpkg dose not detect my system architecture.
when I want to install apt, below error occurs:
Code:

root [ /sources ]# dpkg --print-architecture

root [ /sources ]# dpkg-architecture
Use of uninitialized value $v{"DEB_BUILD_GNU_TYPE"} in split at /usr/bin/dpkg-architecture line 183.
DEB_BUILD_ARCH=
Use of uninitialized value $v{"DEB_BUILD_ARCH_OS"} in concatenation (.) or string at /usr/bin/dpkg-architecture line 194.
DEB_BUILD_ARCH_OS=
Use of uninitialized value $v{"DEB_BUILD_ARCH_CPU"} in concatenation (.) or string at /usr/bin/dpkg-architecture line 194.
DEB_BUILD_ARCH_CPU=
Use of uninitialized value $v{"DEB_BUILD_ARCH_BITS"} in concatenation (.) or string at /usr/bin/dpkg-architecture line 194.
DEB_BUILD_ARCH_BITS=
Use of uninitialized value $v{"DEB_BUILD_ARCH_ENDIAN"} in concatenation (.) or string at /usr/bin/dpkg-architecture line 194.
DEB_BUILD_ARCH_ENDIAN=
Use of uninitialized value $v{"DEB_BUILD_GNU_CPU"} in concatenation (.) or string at /usr/bin/dpkg-architecture line 194.
DEB_BUILD_GNU_CPU=
Use of uninitialized value $v{"DEB_BUILD_GNU_SYSTEM"} in concatenation (.) or string at /usr/bin/dpkg-architecture line 194.
DEB_BUILD_GNU_SYSTEM=
Use of uninitialized value $v{"DEB_BUILD_GNU_TYPE"} in concatenation (.) or string at /usr/bin/dpkg-architecture line 194.
DEB_BUILD_GNU_TYPE=
DEB_HOST_ARCH=i386
DEB_HOST_ARCH_OS=linux
DEB_HOST_ARCH_CPU=i386
DEB_HOST_ARCH_BITS=32
DEB_HOST_ARCH_ENDIAN=little
DEB_HOST_GNU_CPU=i486
DEB_HOST_GNU_SYSTEM=linux-gnu
DEB_HOST_GNU_TYPE=i486-linux-gnu
root [ /sources ]#

2nd: when I try to install apt or bootstrapping dpkg to overcome above problem, below errors occurs:
Code:

root [ /sources ]# dpkg -i apt_0.8.10.3+squeeze1_i386.deb
tar: Skipping to next header
tar: Exiting with failure status due to previous errors
dpkg-deb: subprocess tar returned error exit status 2
dpkg: error processing apt_0.8.10.3+squeeze1_i386.deb (--install):
 subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
 apt_0.8.10.3+squeeze1_i386.deb

Code:

root [ /sources ]# dpkg --force-architecture -i apt_0.8.10.3+squeeze1_i386.deb
tar: Skipping to next header
tar: Exiting with failure status due to previous errors
dpkg-deb: subprocess tar returned error exit status 2
dpkg: error processing apt_0.8.10.3+squeeze1_i386.deb (--install):
 subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
 apt_0.8.10.3+squeeze1_i386.deb

Code:

root [ /sources ]# dpkg --force-architecture -i dpkg_1.15.8.13_i386.deb
dpkg-deb (subprocess): data: internal gzip read error: '<fd:0>: invalid distance too far back'
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
dpkg-deb: subprocess tar returned error exit status 2
dpkg: error processing dpkg_1.15.8.13_i386.deb (--install):
 subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
 dpkg_1.15.8.13_i386.deb

Code:

root [ /sources ]# dpkg -i dpkg_1.15.8.13_i386.deb
dpkg-deb (subprocess): data: internal gzip read error: '<fd:0>: invalid distance too far back'
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
dpkg-deb: subprocess tar returned error exit status 2
dpkg: error processing dpkg_1.15.8.13_i386.deb (--install):
 subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
 dpkg_1.15.8.13_i386.deb

what must I do? please help me. :(
I googled for hours but dose not find any usefull solutions :(

michaelk 11-26-2012 10:57 AM

Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

Continue here:
http://www.linuxquestions.org/questi...kg-4175438741/


All times are GMT -5. The time now is 12:33 PM.