如何在hostgator linux共享主机上安装ASP.NET Core应用程序?

时间:2019-02-25 21:24:37

标签: c# linux asp.net-core asp.net-core-mvc

我尝试使用Hanselman https://www.hanselman.com/blog/RunningASPNETCoreOnGoDaddysCheapestSharedLinuxHostingDontTryThisAtHome.aspx编写的步骤进行安装。

但是我最终遇到的错误比他在这篇文章中描述的要多得多。这些是我遵循的步骤:

  1. 使用Visual Studio创建MyApp示例应用程序。见图片: App Created
  2. 使用Visual Studio编译项目。然后使用此命令来发布文件:

    dotnet publish -r rhel.6-x64 
  3. 将文件从发布的文件夹上传到我的Linux共享托管站点,请参见图片:Files Uploaded

    From: C:\MyApp\bin\Debug\netcoreapp2.1\rhel.6-x64\publish
    到Linux共享托管站点public_http文件夹,当然使用WinSCP。

  4. 然后进入我的共享Linux Cpanel并启用我的SSH连接

  5. 使用我的用户名和密码SSH,打开Putty登录Linux共享主机服务器。
  6. 将所有许可授予文件:MyApp使其可执行,如Hanselman的帖子所述。
  7. 执行它时,请使用Hanselman帖子中提到的指令。
  8. 首先,它正在抱怨该库:libstdc ++ 6-8.2.1-alt5.x86_64。 https://altlinux.pkgs.org/sisyphus/classic-x86_64/libstdc++6-8.2.1-alt5.x86_64.rpm.html 我使用wget下载并放入了netcoredeps文件夹中。很好。

  9. 其次,它抱怨lib64 / libc.so.6版本glibc_2.18。我发现了这个:glibc-core-2.27-alt8.x86_64。在https://altlinux.pkgs.org/sisyphus/classic-x86_64/glibc-core-2.27-alt8.x86_64.rpm.html。我使用wget下载并放入了netcoredeps文件夹中。很好。

  10. 然后尝试使用./MyApp再次运行该应用,并得到:
    / relocation error: /home2/xxxx/public_html/netcoredeps/libc.so.6: symbol _dl_starting_up, version GLIBC_PRIVATE not defined in file ld-linux-x86-64.so.2 with link time reference 

Error Image

这个netcoredeps文件夹最终像这样:

How Ends The netcoredeps Folder

1 个答案:

答案 0 :(得分:0)

一种可能的解决方案是,如果LD_LIBRARY_PATH或MIC_LD_LIBRARY_PATH中有/ lib,则将其删除。

相关问题