title: How to fix: Error CREATEing SolrCore 'gettingstarted': Unable to create core
body: <p>I'm getting this error when I try to create a new core in solr. </p>
  
  <pre><code>root@ubuntu:/opt/solr# bin/solr create -c gettingstarted -n data_driven_schema_configs
  
  Setup new core instance directory:
  /var/solr/data/gettingstarted
  
  Creating new core 'gettingstarted' using command:
  http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=gettingstarted&amp;instanceDir=gettingstarted
  
  Failed to create core 'gettingstarted' due to: Error CREATEing SolrCore 'gettingstarted': Unable to create core [gettingstarted] Caused by: /var/solr/data/gettingstarted/data
  </code></pre>
  
  <p>Also, if I try to create alternatively, It gives me same error:</p>
  
  <pre><code>root@ubuntu:/opt/solr# bin/solr create -c mycore
  
  Setup new core instance directory:
  /var/solr/data/mycore
  
  Creating new core 'mycore' using command:
  http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=mycore&amp;instanceDir=mycore
  
  Failed to create core 'mycore' due to: Error CREATEing SolrCore 'mycore': Unable to create core [mycore] Caused by: /var/solr/data/mycore/data
  </code></pre>
  
  <p>In browser, when I try to access solr admin panel, it displays a notification like:</p>
  
  <pre><code>SolrCore Initialization Failures
  
  opt/solr/example/exampledocs/*.xml: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: /var/solr/data/opt/solr/example/exampledocs/*.xml/data 
  </code></pre>
  
  <p>snapshot is attached. </p>
  
  <p><img src="https://i.stack.imgur.com/HEV7Z.png" alt="enter image description here"> </p>