0

I am trying install memcached in visual studio in a PHP project

I am running the following command in the Package Manager Console :

PM> Install-Package EnyimMemcached

I am getting the error "Install failed. Rolling back... "

The full error:

Attempting to gather dependency information for package 'EnyimMemcached.2.16.0' with respect to project ', targeting 'Unsupported,Version=v0.0'

Attempting to resolve dependencies for package 'EnyimMemcached.2.16.0' with DependencyBehavior 'Lowest'

Resolving actions to install package 'EnyimMemcached.2.16.0'

Resolved actions to install package 'EnyimMemcached.2.16.0'

Install failed. Rolling back...

Package 'EnyimMemcached.2.16.0' does not exist in project 'project'

Package 'EnyimMemcached.2.16.0' does not exist in folder 'C: \packages'

Install-Package : Could not install package 'EnyimMemcached 2.16.0'. You are

trying to install this package into a project that targets 'Unsupp orted,Version=v0.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

At line:1 char:16

  • Install-Package <<<< EnyimMemcached

    • CategoryInfo : NotSpecified: (:) [Install-Package], Exception

    • FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

I have tried different php version to see if the issue is with the version and still getting the same error

Akbar
  • 93
  • 1
  • 5

1 Answers1

1

“EnyimMemcached” need .NET Framework 3.5 or later version to use. Please refer to here for details: https://github.com/enyim/EnyimMemcached. If you install “EnyimMemcached” to any projects which target to previous version of .NET Framework that before 3.5, you will get the same error.

Since PHP proejct isn’t a .NET Framework type project, you could not install “EnyimMemcached” to a PHP project. If you want to use “memcached” in a PHP project, you need to install and configuration based on below document that from PHP site.

http://php.net/manual/en/book.memcached.php.

Weiwei
  • 3,674
  • 1
  • 10
  • 13
  • Thanks indeed for the links Wendy. I am trying to run a scrapper taken from this link : https://github.com/Openpoint/Imager the error I am getting is "Fatal error occurred Message: Class 'Memcache' not found" here is the screenshot : http://realnewsworld.com/wp-content/sc.png – Akbar Oct 10 '16 at 19:23
  • Please check this project installed memcache or memcached? Because there are two extensions for memcached in PHP, "memcache" and "memcached". Please refer to: http://stackoverflow.com/questions/2659035/php-memcached-fatal-error-class-memcache-not-found . In addition I suggest you contact this project author to check whether there has any issues in this project source code. – Weiwei Oct 11 '16 at 01:51