ScoopInstaller / Main

📦 The default bucket for Scoop.
https://scoop.sh
The Unlicense
1.59k stars 961 forks source link

Installation 'bind' App does not work #710

Closed hhaoao closed 4 years ago

hhaoao commented 4 years ago

Install with the following commands, 'bind' and 'vc_redist', and then 'dig--help' does not respond (As shown in Figure 1), switch to cmd,in the cmd console it cannot find 'MSVCR110.dll' as shown in Figure 2,what should I do?

λ  scoop install bind
WARN  Scoop uses 'aria2c' for multi-connection downloads.
WARN  Should it cause issues, run 'scoop config aria2-enabled false' to disable it.
Installing 'bind' (9.14.8) [64bit]
Loading BIND9.14.8.x64.zip from cache.
Checking hash of BIND9.14.8.x64.zip ... ok.
Extracting BIND9.14.8.x64.zip ... done.
Running installer script...
Linking D:\PortableFiles\Scoop\apps\bind\current => D:\PortableFiles\Scoop\apps\bind\9.14.8
Persisting etc
'bind' (9.14.8) was installed successfully!
'bind' suggests installing 'extras/vcredist2017'.
λ  scoop install vcredist2017
WARN  Scoop uses 'aria2c' for multi-connection downloads.
WARN  Should it cause issues, run 'scoop config aria2-enabled false' to disable it.
Installing 'vcredist2017' (14.16.27027.1) [64bit]
Loading vc_redist.x64.exe from cache.
Loading vc_redist.x86.exe from cache.
Checking hash of vc_redist.x64.exe ... ok.
Checking hash of vc_redist.x86.exe ... ok.
Linking D:\PortableFiles\Scoop\apps\vcredist2017\current => D:\PortableFiles\Scoop\apps\vcredist2017\14.16.27027.1
Running post-install script...
'vcredist2017' (14.16.27027.1) was installed successfully!
Notes
-----
You can now remove this installer with 'scoop uninstall vcredist2017'

Figure 1: 2020-01-05_141109

Figure 2: 2020-01-05_140958

linsui commented 4 years ago

You can install vcredist2012 or wait #711 . This should be an upstream issue.

hhaoao commented 4 years ago

@linsui Thank you very much. After I install vcredist2012, dig.exe work normally. But I found a new problem. After running 'named.exe -V', I found that the default paths is unreasonable. Normal user rights cannot read the "windows \ system32" directory, it would be great if it was "%SCOOP%\persist\bind\etc".

λ  named -V
BIND 9.14.8 (Stable Release) <id:5d87f66>
running on Windows 10 0 build 17763 475 for x64

built by Visual Studio with 'with-system-tests=yes with-openssl=\build64\openssl-1.0.2l with-libxml2=\build64\libxml2-2.9.1 with-geoip2 x64'
compiled by MSVC 1914
compiled with OpenSSL version: OpenSSL 1.0.2l  25 May 2017
linked to OpenSSL version: OpenSSL 1.0.2l  25 May 2017
compiled with libxml2 version: 2.9.1
linked to libxml2 version: 20901
threads support is enabled

default paths:
  named configuration:  C:\WINDOWS\system32\etc\named.conf
  rndc configuration:   C:\WINDOWS\system32\etc\rndc.conf
  DNSSEC root key:      C:\WINDOWS\system32\etc\bind.keys
  nsupdate session key: C:\WINDOWS\system32\etc\session.key
  named PID file:       C:\WINDOWS\system32\etc\named.pid
  named lock file:      C:\WINDOWS\system32\etc\named.lock
  geoip-directory:      .
linsui commented 4 years ago

I'm not a bind user so I don't know how to set the default config directory. I guess it can be set with -c conffile . If you know how to do that could you pr? 😄

hhaoao commented 4 years ago

Download the source code 'bind-9.14.9.tar.gz' and learn from the 'BIND9' official website that building BIND9 on Windows requires reading the 'win32utils.build.txt' file in the source code and found the answer in step 5. Use the search tool to search for the keywords 'registry' or 'BINDInstall' in the directory where the source code is located, and finally confirm the two key files 'BINDInstallDlg.cpp' and 'bind_registry.h'.

As I am not familiar with the registry operation, I do not know how to perfectly restore the bind installation process. I tried to modify a small part of the registry (note the backup of the registry), import the following registry, 'named.exe -V' is displayed The default path becomes normal. . .

I've only been in touch with SCOP for a week, and I'm not familiar with bucket construction right now. I think I need to be familiar with it for a while before I can be able to pr.

It would be great if someone could improve the registry operation according to 'BINDInstallDlg.cpp' and 'bind_registry.h'.

installdir.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\ISC]

[HKEY_LOCAL_MACHINE\SOFTWARE\ISC\BIND]
"InstallDir"="D:\\PortableFiles\\Scoop\\apps\\bind\\current"