Installation from source (git) error: snapcraft validation file is missing from installation path
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Fix Released
|
Medium
|
Kyle Fazzari |
Bug Description
When trying to install snapcraft from source, there are a few rough edges and in the end snapcraft will not work because the snapcraft validation file is not placed in the correct location.
Specifically,
1. Create a new LXD container (lxc launch ubuntu:x snaps)
2. Enter the container
lxc exec snaps -- /bin/bash
3. Install the dependency packages
apt update
apt upgrade -y
apt build-dep snapcraft
4. Get the source of snapcraft,
git clone https:/
5. Build and install
cd snapcraft/
python3 setup.py build
python3 setup.py install
6. Test the newly install snapcraft
# mkdir mytest
# cd mytest
# snapcraft init
# snapcraft
Issues while validating snapcraft.yaml: snapcraft validation file is missing from installation path
WHAT SHOULD HAVE HAPPENED: snapcraft should have created the null snap.
WHAT HAPPENS: snapcraft cannot find the schema "snapcraft.yaml".
Specifically, snapcraft (installed from source) tries to find the schema snapcraft.yaml in /usr/share/
However, the schema is installed in
/usr/local/
Changed in snapcraft: | |
status: | In Progress → Fix Committed |
milestone: | none → 2.31 |
Changed in snapcraft: | |
status: | Fix Committed → Fix Released |
Workaround that works for me:
sudo ln -s /usr/local/ lib/python3. 5/dist- packages/ snapcraft- 2.28-py3. 5.egg/share/ snapcraft/ /usr/share/ snapcraft