I had KiCad 4 installed previosly. Now i updated to v5. Now i have some problems with the library setup

Recommended reading: Library management in KiCad version 5

KiCad does not automatically discover libs. Nor does it update the list of libraries on update.

If you had KiCad 4.0.x installed previously then i would bet you still have parts of its configuration surviving. Most importantly the fp-lib-table. This file controls which footprint libs you use. If this is the case then you probably still run the on demand online footprint libs originally “distributed” with KiCad 4.0.x installations. The installer for the KiCad 5.0.0 however replaced the local symbol and 3d model files. This means your lib is now inconsistent. (There was a rather large reorganization in the library between these two releases)

How you know you are affected by this.

If your fp-lib-table uses the github plugin to serve libs (instead of legacy) then you have the version 4 library (plugin type is github, KIGITHUB is in the path)

But you could also have local libs still surviving from v4.
It is easy to discover if this is the case. Open the library manager in pcb_new and check if you have any lib with the prefix Housings (example Housings_DIP) if this is the case you run the version 4 footprint libs. (These libs have been renamed to the better fitting suffix Package in the version 5 library)
Generally any library with plural name is a dead giveaway that you are using version 4 libraries.


How to fix it

Short version: you need to get all your libs to the same version (either all libs to how they were at version 4 or all of them from version 5.)

Option 1: Update the library setup to use version 5 footprint libs (recommended)

This will mean that old projects are harder to work with. (You no longer have the same lib as you had back when you designed the project.) It might be worth the extra effort as the new lib has some major improvements. (The quality of both footprints and symbols did increase. The organization scheme is now easier to understand, …)

For this you need to update the fp-lib-table to use version 5 libs. The libraries should already be installed locally. The libs should be found under C:\Program Files\KiCad\share\kicad\modules for windows users and /usr/share/kicad/modules for linux users. If they are not installed read this post

Sadly there is no KiCad inbuild way to reset the library tables to the version 5 default. (See feature request for “Reset lib tables to default”. Which means we need to manually do this.

The safest way is to use the library manager and add the libs manually. (Has the downside of not getting library descriptions.)

  • Open the lib manager found in the preferences menu of the footpritn editor (In v5.1 this will also be found in the preferences menu of the kicad main window)
  • Delete all old libs from the lib table (the ones starting with ${KIGITHUB})
  • Use the browse button to add the new libs
    • It opens a tool similar to the file browser.
    • Navigate to the location of the libs and select the ones you want to add. (You can use shift left click and crtl left click to select multiple libs at once. Only select .pretty directories.)

The second option (explaind in great detail in the Appendix section of Library management in KiCad version 5) is to delete your old fp-lib-table from your config directory (under windows found in C:\Users\ …\AppData\Roaming\kicad for linux users it is found in ~/.config/kicad. For OSX it is found under /Users/[your user name]/Library/Preferences/kicad).
When you then start pcb_new from the project manager kicad should ask you if it should create the default library table. After this step you will need to manually add your personal libs again. (As you deleted the file pointing to them.)

Option 2: Downgrade all libs to version 4 libraries.

This option allow you to work with old projects easily but locks you in the old lib that is no longer maintained.

  • Replace the symbol and 3d models that where installed with version 5 of kicad. (Download the 4.0.x release of your choice from: https://github.com/KiCad/kicad-library/releases or clone the git repository and checkout the version you want.)
    • You can place the downloaded files anywhere. The safest option is to use some place inside your home directory.
  • Point your sym-lib-table to this installation.
    • Use the library manager found in the preference menu of the symbol editor (In v5.1 the manager is also available from the kicad main menu)
    • Remove all current libs from the table (Right now the setup will point to v5 libs. You decided to use version 4 libs)
    • Use the browse button to add the libs
      • This opens a file browser like tool
      • Navigate to the place where you put your libs and select the ones you want to add to kicad. (Use the shift and crtl keys to select multiple libs)
  • If necessary also point the KISYS3DMOD path to the place where you put the 3d models. (The path variables are managed with the path setup tool found in the preferences menu of the kicad main window.)

With your current setup you already point to online footprint libs of version 4. ( In more detail you use the current master of the git repository.) As the libs are no longer developed this will unnecessarily use up your data. It is therefore suggested to install the libs locally. Having the libs locally also allows you to install a specific release of the footprints. Read the FAQ article How can i install a specific version of the footprint library? for more details.

Option 3: run both versions of the lib in parallel

The third option is to run both library setups in parallel (or even KiCad 4 and KiCad 5 in parallel) Depending on your operating system this might not be very easily accomplished. (The safest route for a novice is still to run either KiCad 4 or KiCad 5 inside a virtual machine. Everything else requires tampering with system environment variables or startup scripts.)


Additional Information

A detailed description of how the update process could look like can be found in this post (click the link or the arrow to see the full text)

7 Likes