I am getting this error quite often on a test system when trying to install a component which uses SQL updates and causes first time when installing an error (even not SQL related, such a missing file from the manifest file).
Here are some steps on how to fix this, by manually uninstalling the component, as from the Extension manager the installation may / will fail.
Find the id of your extension (you may also find multiple entries)
SELECT *
FROM `#__extensions`
WHERE `name` LIKE '%myextensionname%'
LIMIT 0 , 30
Remove from #__schemas
the entries for extension, where extension_id
is the previous found id. Remove also any entries for non existing extensions:
Remove any assets for your extension:
SELECT *
FROM `#__assets`
WHERE `name` LIKE '%myextensionname%'
LIMIT 0 , 30
Remove any menu entries:
SELECT *
FROM #__menu
WHERE link
LIKE '%myextensionname%'
LIMIT 0 , 30
Reinstall.