Question

Any suggestions on how to deal with this error:

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
------------------------------

This is a new laptop running

  • SQL Server 2016 express
  • Visual Studio 2017
  • SSMS 2017

I tried uninstalling anything related to SQL Server or Visual Studio.

Log: [3500:3970][2017-11-03T16:25:20]e000: Error 0x80070666: Cannot install a product when a newer version is installed.

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
Was it helpful?

Solution

I experienced this problem as well with SQL Server 2017 Developer and it appears to be just bad planning on the part of the SQL Server installation package people. The problem is that Visual Studio 2017 installs the Microsoft Visual C++ 2017 Redistributable (x86) and (x64) and the SQL Server installation tries to install the Microsoft Visual C++ 2015 Redistributables, which it can't because the SQL Server installation doesn't allow you to install an older version with the newer version installed.

This Microsoft Support article presents their explanation of the problem, and their recommended workarounds.

Solution 1: Install SQL Server first before installing Visual Studio 2017.

Solution 2 (what I did):

  1. Uninstall the Microsoft Visual C++ 2017 Redistributable (x86) and (x64),
  2. install SQL Server,
  3. then reinstall the Microsoft Visual C++ 2017 Redistributable (x86) and (x64).

They are a little hard to find, so here are the direct links:

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

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

Note: If you don't have Microsoft Visual C++ 2017 Redistributable installed at all, just install it from one of the above links, and retry installing SQL Server. It should work now.


You may have to repeat these steps when installed additional named instances of SQL Server 2017.

OTHER TIPS

I had the same problem but I was upgrading from SQL Server 2016.

I uninstalled Microsoft Visual C++ 2015 Redistributable, both the x86 & x64, then it upgraded successfully.

I got the error when trying to repair my SQL Server 2017 installation. I found this link VC++ 2015 Redistributable installation returns error 1638 when newer version already installed, which says the issue is fixed in Cumulative Update 13 for SQL Server 2017.

It worked; I applied the update then ran the repair, and it finished without an error.

In Windows' list of apps try to run 'repair' for MS Visual C++ Redistributable

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top