There's a reason for this, I don't know what it is, but the reason you can't do that is because when you declare an array, it cannot have a variable size; every time the code is run the array size must be the same. The only way to be absolutely sure this is true is by using a constant, in one of these ways:
//Using the const operator
const int ls = 1;
...
string libraries[ls];
//Using a macro
#define ls 1
...
string libraries[ls];
//Doing it manually
string libraries[1];
If you want to use a non-constant operator, you have to create the array like this:
string *libraries = new string[ls];
...
delete[] string;
delete[] removes the memory space allocated for the array, and must be called or else memory will remain allocated after your program closes (So other programs can't use it). So if you use new[], always call delete[]
Another way is by using vectors, I won't go into this but if you use 'em it means you don't have to worry about memory leaks.
Edit: and incidentally, use better variable names. If you write much more code with that, it'll be hell to go back a month or two from now and try to modify it.