我已经从https://github.com/magento/magento2下载并安装了Magento 2
但我在位于http:// localhost / magento2 / pub / static /的脚本和cs遇到404错误
我已经检查过,Apache重写引擎已打开。但是,css和js文件仍未加载。
当我尝试直接从浏览器访问文件时,出现以下异常。
Cannot create a symlink for "D:/xampp/htdocs/magento2/lib/web/mage/calendar.css" and place it to "D:/xampp/htdocs/magento2/pub/static/frontend/Magento/blank/en_US/mage/calendar.css" Warning!symlink(): Cannot create symlink, error code(1314)
#0 D:\xampp\htdocs\magento2\lib\internal\Magento\Framework\Filesystem\Directory\Write.php(155): Magento\Framework\Filesystem\Driver\File->symlink('D:/xampp/htdocs...', 'D:/xampp/htdocs...', Object(Magento\Framework\Filesystem\Driver\File))
#1 D:\xampp\htdocs\magento2\lib\internal\Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink.php(30): Magento\Framework\Filesystem\Directory\Write->createSymlink('lib/web/mage/ca...', 'frontend/Magent...', Object(Magento\Framework\Filesystem\Directory\Write))
#2 D:\xampp\htdocs\magento2\lib\internal\Magento\Framework\App\View\Asset\Publisher.php(65): Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink->publishFile(Object(Magento\Framework\Filesystem\Directory\Write), Object(Magento\Framework\Filesystem\Directory\Write), 'lib/web/mage/ca...', 'frontend/Magent...')
#3 D:\xampp\htdocs\magento2\lib\internal\Magento\Framework\App\View\Asset\Publisher.php(49): Magento\Framework\App\View\Asset\Publisher->publishAsset(Object(Magento\Framework\View\Asset\File))
#4 D:\xampp\htdocs\magento2\lib\internal\Magento\Framework\App\StaticResource.php(118): Magento\Framework\App\View\Asset\Publisher->publish(Object(Magento\Framework\View\Asset\File))
#5 D:\xampp\htdocs\magento2\lib\internal\Magento\Framework\App\Bootstrap.php(245): Magento\Framework\App\StaticResource->launch()
#6 D:\xampp\htdocs\magento2\pub\static.php(13): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\StaticResource))
#7 {main}
我的操作系统是Windows 7,正在运行xampp服务器。