Drupal升级到8.2.3失败了

时间:2016-11-18 22:43:11

标签: drupal drush

我有一个全新安装的Drupal 8.2.2正在运行,并跟着https://www.drupal.org/node/2550801用drush更新它,但我得到了:

$ drush pm-update drupal
Update information last refreshed: Fri, 11/18/2016 - 22:02
 Name    Installed Version  Proposed version  Message                   
 Drupal  8.2.2              8.2.3             SECURITY UPDATE available 


Code updates will be made to drupal core.
WARNING:  Updating core will discard any modifications made to Drupal core files, most noteworthy among these are .htaccess and robots.txt.  If you have made any modifications to these files, please back them up before updating so that you can re-create your modifications in the updated version of the file.
Note: Updating core can potentially break your site. It is NOT recommended to update production sites without prior testing.

Do you really want to continue? (y/n): y
Drupal root path is not writable.                                                                                                    [error]
/var/www/html $ drush pm-update drupal
Update information last refreshed: Fri, 11/18/2016 - 22:02
 Name    Installed Version  Proposed version  Message                   
 Drupal  8.2.2              8.2.3             SECURITY UPDATE available 


Code updates will be made to drupal core.
WARNING:  Updating core will discard any modifications made to Drupal core files, most noteworthy among these are .htaccess and robots.txt.  If you have made any modifications to these files, please back them up before updating so that you can re-create your modifications in the updated version of the file.
Note: Updating core can potentially break your site. It is NOT recommended to update production sites without prior testing.

Do you really want to continue? (y/n): y
Project drupal was updated successfully. Installed version is now 8.2.3.
Backups were saved into the directory /home/www-data/drush-backups/drupal/20161118222811/drupal.                                        [ok]
[18-Nov-2016 22:28:41 UTC] Error: Call to undefined function drupal_get_installed_schema_version() in /var/www/html/core/includes/install.inc on line 80 #0 phar:///usr/local/bin/drush/commands/core/drupal/update.inc(111): drupal_load_updates()
#1 phar:///usr/local/bin/drush/commands/core/core.drush.inc(462): update_main()
#2 phar:///usr/local/bin/drush/includes/command.inc(422): drush_core_updatedb()
#3 phar:///usr/local/bin/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#4 phar:///usr/local/bin/drush/includes/command.inc(199): drush_command()
#5 phar:///usr/local/bin/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#6 phar:///usr/local/bin/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#7 phar:///usr/local/bin/drush/includes/startup.inc(458): drush_main()
#8 phar:///usr/local/bin/drush/includes/startup.inc(365): drush_run_main(false, '/', 'Phar detected. ...')
#9 phar:///usr/local/bin/drush/drush(114): drush_startup(Array)
#10 /usr/local/bin/drush(10): require('phar:///usr/loc...')
#11 {main}
Error: Call to undefined function drupal_get_installed_schema_version() in drupal_load_updates() (line 80 of /var/www/html/core/includes/install.inc).
Drush command terminated abnormally due to an unrecoverable error. 

我错过了什么吗?

3 个答案:

答案 0 :(得分:0)

我已成功将drupal 8.2.2更新到新版本8.2.3。 请找到步骤

$ drush pm-update drupal
Update information last refreshed: Mon, 11/21/2016 - 12:05
 Name    Installed Version  Proposed version  Message                   
 Drupal  8.2.2              8.2.3             SECURITY UPDATE available 


Code updates will be made to drupal core.
WARNING:  Updating core will discard any modifications made to Drupal core files, most noteworthy among these are .htaccess and robots.txt.  If you have made any modifications to these files, please back them up before updating so that you can re-create your modifications in the updated version of the file.
Note: Updating core can potentially break your site. It is NOT recommended to update production sites without prior testing.

Do you really want to continue? (y/n): y

Project drupal was updated successfully. Installed version is now 8.2.3.
Backups were saved into the directory /home/drush-backups/d8_dbupdate_nov21/20161121110543/drupal.                                   [ok]

The following updates are pending:

system module : 
  8202 -   Clear caches due to behavior change in MachineName element. 

Do you wish to run all pending updates? (y/n): y

Performing system_update_8202                                                                                                               [ok]

Cache rebuild complete.                                                                                                                     [ok]

Finished performing updates.                                                                                                                [ok]

将drush更新到最新版本可能有助于解决此问题。

 $ drush version

Drush Version:8.1.7

还要比较php版本。

答案 1 :(得分:0)

确保您的网络服务器可以读取这些文件。可能是core / includes / schema.inc不可读(这是drupal_get_installed_schema_version所在的位置)。

答案 2 :(得分:0)

我知道这是一个老问题,但是我只是面对过它。就我而言,看来我只需要使用添加sudo

的特权启动drush命令