Hi, Eric Please see my comments inline.
Thanks, Vivian Wang 发自我的 iPhone > 在 2017年3月8日,10:06,Eric Cooper <e...@cmu.edu> 写道: > > I'm not exactly sure what you're trying to do with "creating a local > repository". approx-import simply places .deb files in the part of > the cache that corresponds to a *remote* repository, if it can find > one, so that it doesn't have to be downloaded again. It's optional, > since the .debs will be downloaded when needed. > [Vv] For your doubts on the local repo, there were some exploratory attempts to address the issue of 404 bad response. --- Warning messages by apt-get update W: Failed to fetch http://127.0.0.1:80/debian/dists/jessie/packages/binary-amd64/Packages 400 Bad Request 1. As founding the apt treatshttp://127.0.0.1:80/debian as a repo, e.g.:http://ftp.pl.debian.org/debian, I attempt to create the local repo with same layout as remote under the approx’s cache. But it doesn’t work for apt to get packages. That’s what I do with the local repo. I meant to provide you more hint, if it confused you , just forget itJ 2. I used approx-import to put *.deb files under its cache, but it doesn’t for approx either. (feel disappointed, but what could I do? ┑( ̄Д ̄)┍) 3. Create local repo under /packages and addfile:/// to /etc/apt/apt’s sources.list. it does work. -- create local repository # cp /var/cache/apt/archives/*.deb /packages # dpkg-scanpackages /packages/ /dev/null |gzip >/packages/Packages.gz -- add thefile:///source to /etc/apt/sources.list, and comment approx entrance deb file:/// packages/ #http://127.0.0.1:80 jessie main --- try to install python from local repo # apt-get install python Reading package lists... Done …… The following NEW packages will be installed: python 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/151 kB of archives …… > If you create your own repository with dpkg-scanpackages, you can't > place it in the approx cache. Approx expects its cache to have a > specific layout, namely a collection of (partial) mirrors of remote > repositories. You'd have to put your local repo somewhere else, and > use file:/// URLs in /etc/approx.conf to tell approx where to find it. > [Vv] As you suggest I put file:///packages/ to approx.conf, but approx cannot find packages still. --- /etc/apt/sources.list #deb file:/// packages/ http://127.0.0.1:80 jessie main --- /etc/approx/approx.conf #debian http://ftp.pl.debian.org/debian debian file:///packages/ --- try to install python from local repo # apt-get install python Reading package lists... Done Building dependency tree Reading state information... Done Package python is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: python-minimal E: Package 'python' has no installation candidate --- try execute apt-et update # apt-get update Ign http://127.0.0.1:80 jessie InRelease Ign http://127.0.0.1:80 jessie Release.gpg Ign http://127.0.0.1:80 jessie Release Err http://127.0.0.1:80 jessie/main amd64 Packages 400 Bad Request Ign http://127.0.0.1:80 jessie/main Translation-en_HK Ign http://127.0.0.1:80 jessie/main Translation-en W: Failed to fetch http://127.0.0.1:80/debian/dists/jessie/main/binary-amd64/Packages 400 Bad Request > Otherwise, the current version of approx is 5.7. If you still have > problems after addressing the above issue, please try that version. > [Vv] As the debian version is 8.3, Jessie, on which the stable version of approx. is 5.5-1, apt-get installed this version for Jessie. But I cannot get 5.7 by modifying the source to sid, e.g.: deb http://ftp.pl.debian.org/debian sid main contrib non-free. I downloaded approx_5.7-3.debian.tar.xz, but it seems complex to build and install by checking https://www.debian.org/doc/manuals/debian-faq/ch-pkg_basics.en.html. do you have any suggestion? > > -- > Eric Cooper e c c @ c m u . e d u