"O2/latest-dev-o2 was not found" after aliBuild

I am experiencing a strange behavior on alidock, where it is not possible to enter the O2 environment after running aliBuild with
[alidock] ~/alice $> aliBuild build O2 --defaults o2

Right after that o notice that O2 is not listed by

$ alienv q

Thanks in advance,

It is now fixed by deleting directory ~/.sw/BUILD/.

Dear Rafael ,
I build the O2 environment successfully but I was not enter in the O2 environment as shown in figure . Any comments on it ?

Hi @bmughal , the problem is likely due to a faulty environment variable, pointing to the wrong path. With my poor knowledge on how alienv works, all I can say is that my solution was to delete the whole sw folder and rebuild everything from scratch. Nowadays, two years later, this takes a lot of time and electricity, and it may much more reasonable to try to fix the path. (perhaps I should have done that as well).
If you have followed these instructions to set ALIBUILD_WORK_DIR, you may have to start a new shell for loading this variable. If this is not the problem, some expert may suggest an alternative.