sources.list use proxy

 

Add 25acquire.txt fiel to etc/apt/apt.conf.d/

 

 

25acquireis as follow:

 

 

 

 

// Options for the downloading routines
Acquire
{
  Queue-Mode "host";       // host|access
  Retries "0";
  Source-Symlinks "true";

  // HTTP method configuration
  http
  {
    Proxy " http://172.16.99.131:911";
    Proxy::debian.ustc.edu.cn "DIRECT";  // Specific per-host setting
    Timeout "120";
    Pipeline-Depth "5";

    // Cache Control. Note these do not work with Squid 2.0.2
    No-Cache "false";
    Max-Age "86400";     // 1 Day age on index files
    No-Store "false";    // Prevent the cache from storing archives
//    Dl-Limit "7";        // 7Kb/sec maximum download rate
  };


  // HTTPS method configuration:
  // - uses the http proxy config
  // - uses the http cache-control values
  // - uses the http Dl-Limit values
  https
  {
//        Verify-Peer "false";
//        SslCert "/etc/apt/some.pem";
//        CaPath  "/etc/ssl/certs";
        Verify-Host "2";
  };

  ftp
  {
    Proxy "http://172.16.99.131:911/"; // your proxy
    Proxy::debian.ustc.edu.cn "DIRECT"; // Specific per-host setting

    /* Required script to perform proxy login. This example should work
       for tisfwtk */
//    ProxyLogin
//    {
//       "USER $(PROXY_USER)";
//       "PASS $(PROXY_PASS)";
//       "USER $(SITE_USER)@$(SITE):$(SITE_PORT)";
//       "PASS $(SITE_PASS)";
//    };

    Timeout "120";

    /* Passive mode control, proxy, non-proxy and per-host. Pasv mode
       is prefered if possible */
//    Passive "true";
//    Proxy::Passive "true";
//    Passive::http.us.debian.org "true"; // Specific per-host setting
  };

//  cdrom
//  {
//    mount "/cdrom";

    // You need the trailing slash!
//    "/cdrom/"
//    {
//       Mount "sleep 1000";
//       UMount "sleep 500";
//    }
//  };

//  gpgv
//  {
//   Options {"--ignore-time-conflict";}  // not very usefull on a normal system
//  };

//  mirror
//  {
//   RefreshInterval "360"; // refresh interval in minutes
//   MaxAge "90";           // max age for a mirror file in days before
                          // it gets deleted
   // mirror failure reporting script
//   ProblemReporting "/usr/lib/apt/apt-report-mirror-failure";
   // mirror failure reporting url
//   ReportFailures " http://example.com/mirror-failure";
//  };

  // translations can be set here to "none", "environment" or "$locale"
  Translation "none";
};

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
java.lang.NoSuchMethodException: com.sun.proxy.$proxy58.list错误通常出现在使用Java动态代理时,代理对象的方法调用出现错误。这个异常的发生可能有以下几个原因和解决办法: 1. 方法名拼写错误:首先要检查代码中方法名是否拼写正确。使用IDE进行代码拼写检查是一个好的习惯。 2. 参数类型错误:如果方法调用的参数类型与接口或类定义中的参数类型不匹配,也会触发该异常。要确保传入的参数类型与方法定义中的参数类型相符。 3. 对象类型错误:如果方法调用的对象类型与接口或类定义中的对象类型不匹配,也会触发该异常。要确保调用方法的对象是正确的类型。 4. 方法可见性问题:如果方法是私有方法或受保护的方法,并且访问权限不足,则会触发该异常。可以通过更改方法的可见性修饰符来解决这个问题。 5. 类加载问题:可能是由于类加载器的问题导致的。可以尝试清理和重新加载相关的类。 6. 代理类生成问题:Java动态代理使用字节码生成技术来生成代理类,但是如果代理类生成出现问题,例如生成的代理类缺少需要调用的方法,也会出现该异常。可以尝试重新生成代理类。 总结起来,解决java.lang.NoSuchMethodException: com.sun.proxy.$proxy58.list错误的关键是要确保方法调用的正确性,包括方法名、参数类型、对象类型、方法可见性等方面,并且需要检查类加载和代理类生成的相关问题。如果以上方法仍然无效,可能需要进一步排查代码逻辑和调用链的问题。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值