There have been many posts from Kicad users who, after installing Kicad, find there are no libraries.
Often, this seems to be a case of incorrect installation, but to reinstall or just alter the installation, the configuration files need to be first removed.
@eelik wrote a FAQ explaining where config files are, but I think it would be a good idea to have a list of methods for removing Kicad config. files for all Operating Systems as a single FAQ.
These really need to be blow by blow accounts, with no steps omitted, so brand new to Kicad people, who may not be very computer literate, could follow the instructions.
I’m looking for contributions… The OS, followed by step by step instructions in point form.
Actually I think it would be better for coders who are willing to study the code to understand what role each setting and each config file in the config directory plays to develop a Python script to diagnose and fix the most pressing issues. For a start, the diagnosis function, do the checks that are currently given verbally, such as look in the library directory, do you see files there? This would be more reliable than hoping that the sufferer will follow instructions correctly.
To re-setup the libraries, you should just need to delete the sym-lib-table and/or fp-lib-table files for the symbol and footprint libraries respectively. Then restart KiCad.
The first time it tries to do something with the symbol libraries or footprint libraries, it will prompt to setup the respective library tables. Opening eeschema for example will prompt for the symbol libraries, and pcbnew will prompt for footprint libraries (I think, haven’t checked), but other things will do it too. For example opening the “Add symbol” dialog in eeschema will prompt for the footprint library tables, because the add symbol dialog has a footprint preview.
I didn’t feel like doing hardware yesterday so I coded up a checker to scan a user’s configuration. It looks at 3 files, kicad_common.json, sym-lib-table and fp-lib-table and reports problems. You can find it at https://github.com/retiredfeline/kicad6cfgchk There are clone and download options from the Code dropdown.
Limitations: You need to install the sexpdata Python module if not already installed for handling S-expressions, say with pip3. It only works for Linux at the moment but I’ll fix that when I find out what the configuration directory and system libaries paths are for the other 2 platforms.
$ python3 kicad6cfgchk.py -a
Checking /home/me/.config/kicad/6.0/kicad_common.json
KICAD_TEMPLATE_DIR=/usr/share/kicad/template
KICAD_USER_3DMOD=/home/me/lib/kicad/Me/Me.3dshapes
KICAD_USER_TEMPLATE_DIR=/home/me/lib/kicad/template
KIGITHUB=https://github.com/KiCad
Checking /home/me/.config/kicad/6.0/sym-lib-table
Me (KiCad) /home/me/lib/kicad/Me/Me.kicad_sym found
4xxx (KiCad) ${KICAD6_SYMBOL_DIR}/4xxx.kicad_sym found
4xxx_IEEE (KiCad) ${KICAD6_SYMBOL_DIR}/4xxx_IEEE.kicad_sym found
[...]
Checking /home/me/.config/kicad/6.0/fp-lib-table
Audio_Module (KiCad) ${KICAD6_FOOTPRINT_DIR}/Audio_Module.pretty found with 2 fo
otprints
Battery (KiCad) ${KICAD6_FOOTPRINT_DIR}/Battery.pretty found with 43 footprints
Button_Switch_Keyboard (KiCad) ${KICAD6_FOOTPRINT_DIR}/Button_Switch_Keyboard.pr
etty found with 29 footprints
[...]
Have at it and I’ll see about the other platforms.
I’m feeling a bit embarassed here.
I can’t escape the feeling that my whining and complaining over the last week has brought on this discussion.
I found the root cause (the error on the kicad.org Ubuntu page) and it’s been addressed. My installation is running well now.
Updating the documentation and FAQs and “Tips&Tricks” might be the better option. But it’s up to you.
Thank You All.
Nothing to do with you. I just needed some programming practice and it could help future users. It shoud diagnose other kinds of problems such as undefined environment variables. The most difficult part of the exercise was anticipating problems that could occur in config files when I have none in my own.
Concerning the current topic: here’s an input from this user:
Resetting the configuration files is fine, but think about the custom libraries.
Each and every custom library has to be loaded manually afterwards, and that’s incredibly tedious.
When you’ve messed up the config badly sometimes you need to hit the factory reset button to get a fresh start.
Personally I think the problem stems from the choices presented at the first run dialog. There were a couple of choices other than the default which some users looked at and thought I have personal libraries so that’s me! I think it should have installed the default system libraries anyway and then presented the user with the options of migrating the non-system libraries.
The other reason I coded the checker is many software suites have some kind of configuration checker to show whether the installed configuration makes sense. KiCad shouldn’t be an exception.
The reason behind this comment was someone new to Kicad who has incorrectly installed the program really doesn’t have a clue what to do. @gkeeth posted a link above to the new documentation, but, for an incorrect installation the libraries and their paths are missing, resulting in more confusion.
There is the comment:
On first run, KiCad prompts the user to set up the symbol library table and footprint library table. To go through this setup again, delete or rename the symbol library table or footprint library table files. Make a backup of the tables before deleting them.
The location of the symbol and footprint library table files depends on operating system.
This comment only addresses the actual library table files but not the path to them… more confusion for the newbee.
The paths can be found in the Configuration paths, but again, how is the newbee to know that?
To me, the instruction posted by @retiredfeline in another post is GREAT!
Asking a Ubuntu newbee to blindly type or paste this “rm -fr ~/.config/kicad/6.0” into the terminal, restart, then select "copy default… (recommended), after opening Kicad solves all the problems of the installation.
This comment only addresses the actual library table files but not the path to them… more confusion for the newbee.
Is the confusion about the location of the library table files or the location of the library files? I’m not quite clear from what you said.
The location of the library table files is given in the link I gave. The library location is not given explicitly.
If you’re talking about the library location, I’m not sure that I understand why the location of the libraries themselves is important for new users to know, though. I don’t think knowing the library installation location helps users determine whether they have the up-to-date libraries installed unless they know what the up-to-date libraries look like. In that case they probably don’t need the help?
I do think the documentation should be improved so it’s clear in all cases how to properly install KiCad, but it’s not clear to me yet what the deficiencies are.
For an incorrect installation there are no libraries in the “Preferences / Manage Libraries” so their location needs to be given explicitly.
The instructions read :
delete or rename the symbol library table or footprint library table files. Make a backup of the tables before deleting them.
which is difficult not knowing their exact whereabouts.
Personally, I’m with @retiredfeline
The installation needs to automatically include Kicad symbol & footprint libraries. If they are not required by users they can be very easily inactivated or deleted from the “Manage Libraries” lists.
This would render this installation problem, some have, as obsolete.
How much clout(influence) do you have with the developers, gkeeth?
Perhaps I’m not understanding you. The location of the symbol library tables (sym-lib-table and fp-lib-table) is given directly following the line you quote.
It’s true that the installation location of the libraries themselves (ie the .kicad_sym and .kicad_mod files) is not given, but I don’t see why that’s relevant when the goal is to delete the library table to re-run the library setup.
No more than anyone else, but I did write most of the guide, which is why I’m focused on it
The user did not select the correct library table when kicad prompted for which one to use (default one from the libraries, browse to a user one, or use an empty one).
The way to fix this is to delete the user’s library table files in the filesystem so that KiCad will prompt the user to setup the library tables again. That’s what that section is describing. There’s nothing the user can or should do in the library table dialog (yet).
Of course one of the reasons that a user could set up the library tables incorrectly, by picking the wrong library table option, would be because the new libraries aren’t installed and therefore KiCad can’t find the default library table file that’s packaged with the libraries. But in that case the user needs to get the libraries installed before they can fix anything else, and knowing the library path won’t help them.