[General Questions and Answers] verdy_p:
Note that even when using "restore factory defaults", and erasing the SD card, this error persists! The error is in fact in the *system* partition (not touched by "restore factory defaults") in "/data/data" where there remains tracks of old symbolic links (rather than plain folders) that were pointing to another folder on the SD card.

In "/data/data", don't delete everything, keep the actual folders (with the blue icon) used for system apps or regular apps that are newly installed (in the internal storage) and working. Delete only the symbolic links (their icon is that of a file, and see the "l" letter in the attributes (regular folders, or folder with hard links on the same filesystem have a "d" instead).

It's strange that when instyalling apps, the installer does not detect that there's a broken symbolic link for the app folder pointing nowhere: it should delete that link so that a regular folder can be created, or a new link created correctly to the actual new app storage (and for the home directory of the virtual user that will be mounted with its own access rights). Android does not perform any kind of cleanup: those dead links may happen sometimes or can be caused by apps that were previously mounted on an external SD card: when upgrading Android, the CD card is not remounted correctly, access rights are not correctly converted, Android will jsut see a "new" SD card and proposes to use it for storing new apps, but everything in the system partition is preserved, even if it is now wrong or pointing to nowhere.

Other errors you could get in this situation are error 903 or -506. When the installation fails, Google Play proposed to visit a page that does not speka at all about this problem (none of the solutions proposed there will work, not even the last solution with "factory reset").

The factory reset should cleanup all dead links in "/data/data", it does not !

---------- Post added at 05:55 PM ---------- Previous post was at 05:40 PM ----------

Note that With Android 6 (Marshmallow), the system is confused now when there are two partitions or more on the SD card after the upgrade! It mounts them incorrectly, all on the same mount point ! It will say that they are corrupted and will attempt to format one, but will still fail with the other ones (appearing then as "not mounted"). Trying to suppress the entry (with the same display name) will in fact not work.

You'll then need to remove repartition the SD card: remove all partitions on it, reboot, remove it from the "Storage and USB" settings panel, eject it, reboot without the SD, make sure that it does not come back, remove it again.

Then switch off your mobile, insert the SD card (still with no partitions on it): Androit will propose to reformat the SD card and prepare it either for media storage (it will be formated in FAT32 without Linux security) or as internal storage (it will format it as ext2, with full support of security, i.e. user/group/access rights and ownerships, at that SD card will only be usable on the same device: the medias on it will still be accessible externally from the USB cable by a connected PC, using the MTP protocol).

The method for storing apps on the SD card has changed radically in Marshmallow.