LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 811|回复: 8

使用APT安装了GCC等编译器后APT就不能用了

[复制链接]
发表于 2008-5-21 22:50:51 | 显示全部楼层 |阅读模式
现在只要使用APT相关的命令都只会提示
command not found
请问这个怎么回事呢?有没有办法恢复的.郁闷死了啊.....


好像确实是APT被卸载了.我从DEBIAN的官方下载了apt_0.6.46.4-0.1.tar.gz 但是里面又没有安装说明,实在是不知道怎么安装啊.装了好几次都是失败
有没有谁能帮个忙呢?谢谢了

我安装的时候
debian:~/apt-0.6.46.4.1# ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for library containing strerror... none required
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for ranlib... ranlib
checking for ar... ar
checking for library containing gethostbyname... none required
checking for library containing connect... none required
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... no
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking db.h usability... no
checking db.h presence... no
checking for db.h... no
checking system architecture... i386
checking system OS... linux
checking for C99 integer types... yes
checking for statvfs... yes
checking for timegm... yes
checking whether byte ordering is bigendian... (cached) no
checking for missing socklen_t... no
checking for h_errno... normal
checking for debiandoc2html... no
checking for debiandoc2text... no
checking for docbook2man... no
checking for xmlto... no
checking for getconf... /usr/bin/getconf
checking number of cpus... 2
checking processor multiplier... 2
checking number of processes to run during make... 4
checking glibc version... libc6.7
checking libstdc++ version... 6
checking if g++ -MD works... yes, for output
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether NLS is requested... yes
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for shared library run path origin... /bin/sh: buildlib/config.rpath: No such file or directory
done
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
checking for bash... /bin/sh
configure: creating ./config.status
config.status: creating environment.mak
config.status: creating makefile
config.status: creating include/config.h
config.status: creating include/apti18n.h
config.status: executing po-directories commands
config.status: executing default commands
debian:~/apt-0.6.46.4.1#

MAKE也能通过,没有什么意外的情况.但是

debian:~/apt-0.6.46.4.1# make install
make: *** No rule to make target `install'.  Stop.
debian:~/apt-0.6.46.4.1#

请大家帮帮忙,谢谢了
发表于 2008-5-21 22:53:48 | 显示全部楼层
你使用了几个源?

是什么发行版,源和发行版配套吗?

貌似是删除了apt,好像可以使用dpkg -i在安装apt。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-5-21 23:20:54 | 显示全部楼层
我只是用了一个源.
debian的版本号是 2.6.18-6-686 .
我尝试过用dpkg -i再次安装APT,但是出现这样的提示
debian:~# dpkg -i apt-build_0.12.31_i386.deb
(Reading database ... 16249 files and directories currently installed.)
Preparing to replace apt-build 0.12.31 (using apt-build_0.12.31_i386.deb) ...
Unpacking replacement apt-build ...
dpkg: dependency problems prevent configuration of apt-build:
apt-build depends on apt (>= 0.5); however:
  Package apt is not installed.
apt-build depends on apt-utils; however:
  Package apt-utils is not installed.
apt-build depends on devscripts; however:
  Package devscripts is not installed.
apt-build depends on libappconfig-perl (>= 1.5); however:
  Package libappconfig-perl is not installed.
apt-build depends on libapt-pkg-perl (>= 0.1.11); however:
  Package libapt-pkg-perl is not installed.
dpkg: error processing apt-build (--install):
dependency problems - leaving unconfigured
Processing triggers for man-db ...
Errors were encountered while processing:
apt-build
请大家帮帮忙,谢谢.!!
回复 支持 反对

使用道具 举报

发表于 2008-5-21 23:54:32 | 显示全部楼层
我是问你用的是stable还是testing?

你的源是stable还是testing?

不是问题的内核版本号。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-5-22 01:07:07 | 显示全部楼层
是stable啊~
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-5-22 03:46:51 | 显示全部楼层
好像确实是APT被卸载了.我从DEBIAN的官方下载了apt_0.6.46.4-0.1.tar.gz 但是里面又没有安装说明,实在是不知道怎么安装啊.装了好几次都是失败
有没有谁能帮个忙呢?谢谢了
回复 支持 反对

使用道具 举报

发表于 2008-5-22 09:18:16 | 显示全部楼层
你可以试试去光盘里找apt的deb装上啊,源里应该也有deb的吧。
回复 支持 反对

使用道具 举报

发表于 2008-5-22 09:22:30 | 显示全部楼层
不用下载 tar.gz 包,从这个页面 http://packages.debian.org/etch/apt 下方的 “下载 apt” 里找到适合自己内核的 deb 包下载。
回复 支持 反对

使用道具 举报

发表于 2008-5-22 10:32:11 | 显示全部楼层
lz是想源代码安装?

直接用deb不就好了吗?

但是你的系统删掉了apt,你知道原因吗?你不知道原因很难解决问题。

每个包都有依赖关系的,不是下个包就能解决的吧。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表