How to install Kicad without network connection in Ubuntu 18.04?

I just want to know how to install Kicad in Ubuntu if not using the PPA?My network to PPA when installing Kicad is too slow,only 50 kb/s.I’m even worried about somedays later we can’t connect to the PPA in China.So I want a resolution to install Kicad in Ubuntu offline.The question is easy in Windows,only one downloaded EXE install pack.But I tried in Ubuntu several times,and failed to install the program.Does someone know it,need to download which files?Thank you!
For example,if I want to install Kicad 5.01 stable,only to download the files in the red rectangle can do?

I don’t remember anymore how it goes, but it’s possible to keep and copy the downloaded package files locally and then of course copy them to another machine. Some kind of way to do this has naturally been part of debian packaging system for decades or so. After all, it was made before the time of widely spread limitless internet connectivity. You could do some google searching.

The only problem will be dependencies. So @xtp1230 would need to read out all dependencies of kicad and download packages for them as well (and there dependences and so forth.)

That’s right, it should be done for example in a virtual machine with barebones Ubuntu installation to make sure all dependencies are copied. And actually with Ubuntu based distributions it takes even more. It should be the lowest common denominator between all ubuntu based distros to make sure it can be later installed on all of them. And even then the dependencies may break if something requires some other version of some package. I would suggest flatpak or snappy but they are kind of distros inside distros. AppImage is the most self-contained format; see KiCad AppImage for Linux.

Hello,

I really understand the LINUX thinking about dependencies and the idea to share libraries and so on.
But to be honest, this is one of the major reasons why LINUX is without chance on the desktop !
When I show LINUX to friends they are impressed until it comes to drivers and SW-Installation.

But to talk about KiCad: what I would really like is an ISO-File for an oldfashioned Installation-CD.
In the age of TB-HDs nobody cares if there is a lib double installed in the KiCad directory.

That’s pretty much what AppImage format tries to do, install the used libraries with the application without using the system’s libraries. Unfortunately it’s difficult to do in Linux in a way which would make the package work across distros. That’s why AppImage exists. Otherwise you could just compile and copy the files and it would work every time.

OK, in the old DOS times we did exactly that, copy the directory and you have a working installation.
I do not know in detail how LINUX handles installations. I must confess I judge this from the view of a simple user who thinks it must be possible to create a program that runs “standalone” on a given operating system.

Maybe this is the price for freedom - and I will accept it in that case !

For me It would be sufficient to have an installation binary that simply masks the downloads and following steps. But of course this would be no solution for someone with a bad download rate.

The only things that are absolutely required from this PPA are kicad and ngspice-kicad. If you also want the component libraries, get kicad-library-footprints and kicad-library-symbols as well. For the 3D viewer to show more than the bare board, get kicad-library-packages3d as well.

The kicad package has additional dependencies on libraries in Ubuntu, which are not in the KiCad PPA, but can be installed from your local Ubuntu mirror or a CD. You can get a list of dependencies by using dpkg --info on a downloaded .deb file:

$ wget https://launchpad.net/~js-reynaud/+archive/ubuntu/kicad-5/+files/kicad_5.0.1-stable-201810121501+33cea8e~66~ubuntu18.04.1_amd64.deb
…
$ dpkg --info kicad_5.0.1-stable-201810121501+33cea8e~66~ubuntu18.04.1_amd64.deb 
 new debian package, version 2.0.
…
 Depends: libc6 (>= 2.27), libcairo2 (>= 1.6.0), libcurl4 (>= 7.16.2), libgcc1 (>= 1:3.4), libgl1,
  libglew2.0 (>= 1.12.0), libglu1-mesa | libglu1, liboce-foundation11, liboce-modeling11,
  liboce-ocaf-lite11, liboce-ocaf11, libpixman-1-0 (>= 0.15.14), libpython2.7 (>= 2.7), libstdc++6 (>= 6),
  libwxbase3.0-0v5 (>= 3.0.4+dfsg), libwxgtk3.0-0v5 (>= 3.0.4+dfsg), python-wxgtk3.0,
  libngspice-kicad, xsltproc
…

These dependencies will be reused during upgrades, so installing them once will be sufficient, and they don’t have to be downloaded again.

The easiest way to install kicad is to get the .deb files you need from the PPA, use

# dpkg --unpack kicad_*.deb ngspice-kicad_*.deb

to get the packages known to apt/dpkg, and then use

# apt -f install

to “fix” the installation, which it will do by installing missing packages from Ubuntu, or, if that is impossible, reporting what is missing.

2 Likes

Show this to a computer newbie or windows fan and prepare for a lot of laughter … :sweat_smile:

Most (if not all) of that can be done using some form of gui. But it is much easier to communicate a few lines of bash then to make hundreds of screenshots to show how anything like that can be done within some gui that might or might not be version and or setting dependent.


Danger long rant below this line (possibly influenced by the end of august spectre v2 defence windows 10 update and my sacrilegious wish to run my operating system in english not german like anybody else who uses the same PCs.)

I really do not understand this sort of response to a few bash lines. Try to explain some non standard workflow to a windows user. First you will need to find out what exact windows version they run. Then you need to get your hands onto this exact version and find the required things somewhere hidden in some funny dialogs that will look different depending on language settings. (And possible the mood of a random polar bear)
Then you will start to take screenshots and annotate them. (or make a long textual description of what buttons to press in what order. Possibly thrown in some cryptic shortcuts that will show your superiority but will guarantee that the user can never repeat that action on their own.)
With any luck the user will be able to repeat your process. But if they screw up it will be extremly hard to find out where. (possibly by exchanging a lot of screenshots back and forth only to discover some automatic update changed something such that something small is now different)

Now compare that to just blindly copying the bash lines given above and pasting them into a terminal window. (The used programs in this case are extremely basic. They have not changed their interface in years, maybe even decades.) No chance of a mistake here. And if there is a mistake the bash will give a sane error message that the user can copy and report back.

Just yesterday i was frantically searching for a way to resolve a stuck on bootup problem on windows. On linux i would simply press the esc key to get rid of the nice looking splash screen (That hides important debug info) and see where exactly the bootup hangs up. Worst case i would boot up from a stick and read out some text based report files. Type the error description into google and repeat the steps that resolved the same problem for others.

On windows all i know is it never boots. (good luck googling for a solution with this amount of information.) There are no text based report files that one could easily read out. And even if i know the problem, the config files are not text based and can therefore not be edited without windows running anyways. (remember every good damn task must be inside a gui. And if you can not get your gui up you are gonna need your rescue disk and clear your installation because there is not other way.)


In conclusion: Windows can be quite easy to use. (There is a reason it is the most used operating system on PCs.) As long as you never run into any sort of problem. And as long as you use it in exactly the one way intended.

Newbies, offline installers and minimal downloads do not mix. I mean, we could just ship a zip file containing all packages, all dependencies and a script to install it all, but then people would complain about the size. ¯\_(ツ)_/¯

2 Likes

Hi, everything you say is right (no irony here) but I have done this discussion a lot of times because I am working at a “Microsoft is our God” company. And all these arguments are worthless as soon as you mention words like “command line”.
However, this is an old and everlasting discussion and KiCad is certainly one of the “good guys” that serves every system (though I wonder why nobody wants KiCad on an android tablet ? Might be real fun.)

I can not offer a solution, I just envy the windows-people for the option to get everything with one click …

Our main UI concept is “mouse+keyboard”, where key presses replace clicks in many instances. We don’t have a good UI for touchscreen/tablet like devices, with absolute but inexact positioning and too few buttons.

Also, we use “full” OpenGL, not OpenGL ES. IMO, that could and should be changed at some point, so people can get accelerated graphics on RaspberryPi.

Snap package or Appimage could be an option, but I don’t know in which release are available for kicad.
Snap seems to be available for kv4.

This is offtopic, but if anyone is interested in technical difficulties with cross-distro packaging, here’s an interesting story: https://www.phoronix.com/scan.php?page=news_item&px=Linux-Desktop-Issues-2018.

Thats true, I just imagined myself soldering and testing a PCB and viewing schematic and layout on a tablet on my workbench…:mag:
Maybe some day someone will create a simple KiCad viewer for tablets.

Expanding Interactive Html Bom Plugin with schematics preview could be an avenue for this.

Yes thats what I meant. Now it has to become KiCad independent and touchscreen fit ? :wink:

For how much work that is I don’t think it’s worth it. You can simply convert schematic to pdf and view that on the tablet with no plugins needed.

1 Like

I just dreamed of something more interactive, like cross-probing etc. Anyway, I can not do it and its not a real demand for the KiCad developers !