從其他 Windows PC 上的共用資料夾安裝 .deb 套件

從其他 Windows PC 上的共用資料夾安裝 .deb 套件

我有一台裝有 Ubuntu 20.04 LTS 的電腦和另一台裝有 Windows 10 的電腦。在 Windows 上,我有包含 ubuntu 儲存庫的目錄。這個目錄:

.
└── rerository
    ├── dists
    │   └── focal
    │       └── main
    │           └── binary-amd64 -> Packages.gz
    ├── pool
        └── main
            ├── a
            └── b
             etc.

我嘗試新增 resources.list deb file:/192.168.1.1/repository/ focal main,但sudo apt-get update沒有看到我的儲存庫。我如何安裝我的.deb檔案?

答案1

我認為你需要替換file:/httpor https。如果這不是解決方案,請替換file:/file:///.

答案2

我在 Windows Server 2012 r2 上設定 IIS FTP 伺服器並與 ftp 共用我的儲存庫,在防火牆例外中新增「svchost.exe」(沒有它我無法連接到 ftp 伺服器)。在 Ubuntu 20.04 LTS 上透過終端機新增設定echo 'Dir::Bin::Metods::ftp "ftp"; ' | sudo tee -a /etc/apt/apt.conf.d/local-ftp。它命令在 apt 設定(/etc/apt/apt.conf.d)上新增檔案 local-ftp,否則您無法從 ftp 更新儲存庫。最後加入deb [tusted=yes] ftp://ip.ip.ip.ip/ focal main universe multiverse restricted到 source.list 檔案中。然後我編輯 repo 根目錄中的檔案 Release 。我刪除了除 main/binary-amd64(以及其他類似的)之外的所有內容。畢竟 sudo apt update 工作正常。並可能 apt install synaptic(gluster 和其他)並安裝所有依賴項。抱歉我的英文不好。是工作!

相關內容