Is there a way to install Kicad by using local files?

0

I have installed Kicad 5.15 on my computer and it works fine, and I have saved all the deb files downloaded during the last installation and put them in /var/cache/apt/archives, when I need to reinstall, I just need to execute these commands:

> sudo add-apt-repository --yes ppa:js-reynaud/kicad-5.1
> sudo apt update
> sudo apt install --install-recommends kicad

The installation will start automatically, and because of the existence of the deb files, the installation process does not require an Internet connection and is very fast. However, this method does not work after the Kicad provide a latest version update, and the installation process will still access the network to download new files. I don’t want to do this, one of the reasons is that I have a slow internet access and I’m not used to frequently updating software versions. So I made a local APT source according to the online materials, the method is as follows:

> sudo apt install dpkg-dev
> sudo mkdir /var/debs
> sudo cp /var/cache/apt/archives/*.deb /var/debs/
> sudo chmod 777 /var/debs
> sudo cd /var/debs
> sudo dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz

Then I add a line in Sources.list file


> deb file:/var/debs ./

I referenced this page How to create a local APT repository?

But this method does not work. When I run

sudo apt update

I got this:

> sudo apt update
> Get:1 file:/var/debs ./ InRelease
> Ign:1 file:/var/debs ./ InRelease
> Get:2 file:/var/debs ./ Release
> Err:2 file:/var/debs ./ Release
>   File not found - /var/debs/./Release (2: No such file or directory)
> Reading package lists... Done
> E: The repository 'file:/var/debs ./ Release' does not have a Release file.
> N: Updating from such a repository can't be done securely, and is therefore disabled by default.
> N: See apt-secure(8) manpage for repository creation and user configuration details.

When I run the installation command, the prompt is as follows:

> sudo apt install --install-recommends kicad
> E: Malformed entry 76 in list file /etc/apt/sources.list (Suite)
> E: The list of sources could not be read.
> E: Malformed entry 76 in list file /etc/apt/sources.list (Suite)
> E: The list of sources could not be read.

Did I miss something? What should I do to continue using the DEB files saved on my hard drive?

You dont need local apt source to install deb files you already have.
Just do
sudo dpkg -i *.deb

If you have the apt command you can also do:

sudo apt install package.deb

This has the advantage of pulling in dependencies. If they are small you might let it download, otherwise you can fetch them by other means then do

sudo apt install package.deb dep1.deb dep2.deb ...

Some time in the past I posted on this forum about commands or a script to identify all the dependencies of a package. Maybe you can search for that.

Hi, qu1ck and kenyapcomau:

Thanks for you reply, I just tried to install one of these packages - kicad_5.1.5-201911190827+52549c5~84~ubuntu16.04.1_i386.deb, but it seems didn’t work. I believe there are some dependencies between these packages. As kenyapcomau said, maybe I can figure out this dependencies and write a script to install them automatically, but it’s still bit complicated. So I’m going to find a easy way such as using local APT repository…

The error message what I got is:

$ sudo dpkg -i kicad_5.1.5-201911190827+52549c5~84~ubuntu16.04.1_i386.deb
Selecting previously unselected package kicad.
(Reading database … 249342 files and directories currently installed.)
Preparing to unpack kicad_5.1.5-201911190827+52549c5~84~ubuntu16.04.1_i386.deb …
Unpacking kicad (5.1.5-201911190827+52549c5~84~ubuntu16.04.1) …
dpkg: dependency problems prevent configuration of kicad:
kicad depends on liboce-foundation10; however:
Package liboce-foundation10 is not installed.
kicad depends on liboce-modeling10; however:
Package liboce-modeling10 is not installed.
kicad depends on liboce-ocaf-lite10; however:
Package liboce-ocaf-lite10 is not installed.
kicad depends on liboce-ocaf10; however:
Package liboce-ocaf10 is not installed.
kicad depends on python-wxgtk3.0; however:
Package python-wxgtk3.0 is not installed.
kicad depends on libngspice-kicad | libngspice0; however:
Package libngspice-kicad is not installed.
Package libngspice0 is not installed.
kicad depends on xsltproc; however:
Package xsltproc is not installed.

dpkg: error processing package kicad (–install):
dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.23-0ubuntu11) …
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) …
Processing triggers for desktop-file-utils (0.22-1ubuntu5.2) …
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20180209-0ubuntu1) …
Rebuilding /usr/share/applications/bamf-2.index…
Processing triggers for mime-support (3.59ubuntu1) …
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1.1) …
Processing triggers for shared-mime-info (1.5-2ubuntu0.2) …
Errors were encountered while processing:
kicad

After that you can do apt-get install -f to fix broken packages. It will see that kicad has missing dependencies and will offer you some ways to fix it, either install dependencies or uninstall kicad.

I really don’t see how setting up your own repo source is “easy” but good luck if you know what you are doing.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.