Sql-Server

幫助安裝 SQL Server 2017 - VS Shell 安裝失敗,退出程式碼為 1638

  • August 13, 2019

有關如何處理此錯誤的任何建議:

TITLE: Microsoft SQL Server 2017 Setup
------------------------------

The following error has occurred:

VS Shell installation has failed with exit code 1638.

For help, click: https://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft%20SQL%20Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=14.0.1000.169&EvtType=0x5B39C8B9%25401434%25403

------------------------------
BUTTONS:

OK
------------------------------

這是一台正在執行的新筆記型電腦

  • SQL Server 2016 速成版
  • 視覺工作室 2017
  • SSMS 2017

我嘗試解除安裝與 SQL Server 或 Visual Studio 相關的任何內容。

日誌:

$$ 3500:3970 $$$$ 2017-11-03T16:25:20 $$e000:錯誤 0x80070666:安裝較新版本時無法安裝產品。

Detailed results:
 Feature:                       Full-Text and Semantic Extractions for Search
 Status:                        Failed
 Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
 Next Step:                     Use the following information to resolve the error, and then try the setup process again.
 Component name:                Microsoft Visual C++ 2015 Redistributable
 Component error code:          1638
 Component log file:            C:\Program Files\Microsoft SQL Server\140\Setup Bootstrap\Log\20171103_162358\VCRuntime140_x64_Cpu64_1.log
 Error description:             VS Shell installation has failed with exit code 1638.
 Error help link:               https://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=14.0.1000.169&EvtType=VCRuntime140_x64%40Install%400x1638

 Feature:                       Database Engine Services
 Status:                        Failed
 Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
 Next Step:                     Use the following information to resolve the error, and then try the setup process again.
 Component name:                Microsoft Visual C++ 2015 Redistributable
 Component error code:          1638
 Component log file:            C:\Program Files\Microsoft SQL Server\140\Setup Bootstrap\Log\20171103_162358\VCRuntime140_x64_Cpu64_1.log
 Error description:             VS Shell installation has failed with exit code 1638.
 Error help link:               https://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=14.0.1000.169&EvtType=VCRuntime140_x64%40Install%400x1638

我在使用 SQL Server 2017 Developer 時也遇到了這個問題,這似乎只是 SQL Server 安裝包人員的糟糕計劃。問題是 Visual Studio 2017 安裝 Microsoft Visual C++ 2017 Redistributable (x86) 和 (x64) 而 SQL Server 安裝嘗試安裝 Microsoft Visual C++ 2015 Redistributables,因為 SQL Server 安裝不允許您安裝較舊的版本並安裝較新的版本。

這篇Microsoft 支持文章介紹了他們對問題的解釋,以及他們推薦的解決方法。

解決方案 1:在安裝 Visual Studio 2017 之前先安裝 SQL Server。

解決方案2(我做了什麼):

  1. 解除安裝 Microsoft Visual C++ 2017 Redistributable (x86) 和 (x64),
  2. 安裝 SQL Server,
  3. 然後重新安裝 Microsoft Visual C++ 2017 Redistributable (x86) 和 (x64)。

它們有點難找,所以這裡是直接連結:

X64:https ://go.microsoft.com/fwlink/?LinkId=746572

x86:https ://go.microsoft.com/fwlink/?LinkId=746571

注意:如果您根本沒有安裝 Microsoft Visual C++ 2017 Redistributable,只需從上述連結之一安裝它,然後重試安裝 SQL Server。它現在應該可以工作了。


在安裝 SQL Server 2017 的其他命名實例時,您可能必須重複這些步驟。

引用自:https://dba.stackexchange.com/questions/190090