EzDevInfo.com

install interview questions

Top install frequently asked interview questions

Can't install RMagick 2.13.1. Can't find MagickWand.h.

When I try do install rmagick I get the following error message:

Can't install RMagick 2.13.1. Can't find MagickWand.h.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

I'm on Mac OSX 10.6.8, ruby 1.9.2p290, rvm 1.10.2.

Can anyone help me please to solve this problem.


Source: (StackOverflow)

How do I install/set up and use cURL on a Windows?

I have downloaded the latest cURL zip file from the website ver 2.7.24.zip. Now how do I install this in my windows environment to be able to use it? I do not need to build cURL from the source just to use it.
do I need to compile it? If yes, then how do I do that?

I looked for any documentation on installation, but that points to installing cURL as project from source.


Source: (StackOverflow)

Advertisements

install / uninstall APKs programmatically (PackageManager vs Intents)

My application installs other applications, and it needs to keep track of what applications it has installed. Of course, this could be achieved by simply keeping a list of installed applications. But this should not be necessary! It should be the responsibility of the PackageManager to maintain the installedBy(a, b) relationship. In fact, according to the API it is:

public abstract String getInstallerPackageName(String packageName) - Retrieve the package name of the application that installed a package. This identifies which market the package came from.

The current approach

Install APK using Intent

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(apkUri, "application/vnd.android.package-archive");
startActivity(intent);

Uninstall APK using Intent:

Intent intent = new Intent(Intent.ACTION_DELETE, Uri.fromParts("package",
getPackageManager().getPackageArchiveInfo(apkUri.getPath(), 0).packageName,null));
startActivity(intent);

This is obviously not the way e.g. Android Market installs / uninstalls packages. They use a richer version of the PackageManager. This can bee seen by downloading the Android source code from the Android Git repository. Below are the two hidden methods that corresponds to the Intent approach. Unfortunately they are not available to external developers. But perhaps they will be in the future?

The better approach

Installing APK using the PackageManager

/**
 * @hide
 * 
 * Install a package. Since this may take a little while, the result will
 * be posted back to the given observer.  An installation will fail if the calling context
 * lacks the {@link android.Manifest.permission#INSTALL_PACKAGES} permission, if the
 * package named in the package file's manifest is already installed, or if there's no space
 * available on the device.
 *
 * @param packageURI The location of the package file to install.  This can be a 'file:' or a
 * 'content:' URI.
 * @param observer An observer callback to get notified when the package installation is
 * complete. {@link IPackageInstallObserver#packageInstalled(String, int)} will be
 * called when that happens.  observer may be null to indicate that no callback is desired.
 * @param flags - possible values: {@link #INSTALL_FORWARD_LOCK},
 * {@link #INSTALL_REPLACE_EXISTING}, {@link #INSTALL_ALLOW_TEST}.
 * @param installerPackageName Optional package name of the application that is performing the
 * installation. This identifies which market the package came from.
 */
public abstract void installPackage(
        Uri packageURI, IPackageInstallObserver observer, int flags,
        String installerPackageName);

Uninstalling APK using the PackageManager

/**
 * Attempts to delete a package.  Since this may take a little while, the result will
 * be posted back to the given observer.  A deletion will fail if the calling context
 * lacks the {@link android.Manifest.permission#DELETE_PACKAGES} permission, if the
 * named package cannot be found, or if the named package is a "system package".
 * (TODO: include pointer to documentation on "system packages")
 *
 * @param packageName The name of the package to delete
 * @param observer An observer callback to get notified when the package deletion is
 * complete. {@link android.content.pm.IPackageDeleteObserver#packageDeleted(boolean)} will be
 * called when that happens.  observer may be null to indicate that no callback is desired.
 * @param flags - possible values: {@link #DONT_DELETE_DATA}
 *
 * @hide
 */
public abstract void deletePackage(
        String packageName, IPackageDeleteObserver observer, int flags);

Differences

  • When using intents the local package manager is not made aware of which application the installation originated from. Specifically, getInstallerPackageName(...) returns null.

  • The hidden method installPackage(...) takes the installer package name as a parameter, and is most likely capable of setting this value.

Question

Is it possible to specify package installer name using intents? (Maybe the name of the installer package can be added as an extra to the installation intent?)

Tip: If you want to download the Android source code you can follow the steps described here: Downloading the Source Tree. To extract the *.java files and put them in folders according to the package hierarchy you can check out this neat script: View Android Source Code in Eclipse.


Source: (StackOverflow)

How to install plugins to Sublime Text 2 editor?

How to install plugins to the Sublime Text editor?

I would like to install Emmet plugin to Sublime Text 2 editor.


Source: (StackOverflow)

Installing SciPy with pip

It is possible to install NumPy with pip using pip install numpy.

Is there a similar possibility with SciPy? (Doing pip install scipy does not work.)

Update

The package SciPy is now available to be installed with pip, so the question is not relevant anymore.


Source: (StackOverflow)

Is there any way to ignore INSTALL_FAILED_VERSION_DOWNGRADE on application install with the Android Debug Bridge?

It seems like the most recent Android 4.2 has introduced this error condition on installation when one attempts to install an APK with a lower version. In prior versions of Android, one would be able to install older APK's simply via adb install -r <link to APK>. For debugging purposes, I frequently need to re-test older APK's; and the -r flag would replace the older build in older Android versions. Is there a work-around here to ignore [INSTALL_FAILED_VERSION_DOWNGRADE]?


Source: (StackOverflow)

Node.js/Windows error: ENOENT, stat 'C:\Users\RT\AppData\Roaming\npm'

I have Windows 7 32-bit. I installed the latest Node.js 32 bit. When I try to run the command npm install jquery, I receive the error:

Error: ENOENT, stat 'C:\Users\RT\AppData\Roaming\npm

How does one resolve it?


Source: (StackOverflow)

How to select a CRAN mirror in R

I'm trying to install a package through the R prompt by doing the following:

install.packages('RMySQL')

But the output is as follows:

--- Please select a CRAN mirror for use in this session ---

And nothing else! I can't find a solution to this very basic problem. What am I supposed to type in order to select a CRAN mirror?

EDIT:

OS: Mac-OS X 10.6.8 R Version: 2.15.0


Source: (StackOverflow)

Install apps silently, with granted INSTALL_PACKAGES permission

I am trying to silently install apk into the system. My app is located in /system/app and successfully granted permission "android.permission.INSTALL_PACKAGES"

However I can't find anywhere how to use this permission. I tried to copy files to /data/app and had no success. Also I tried using this code

    Intent intent = new Intent(Intent.ACTION_VIEW);
    intent.setDataAndType(
            Uri.parse("file:///sdcard/app.apk"),
            "application/vnd.android.package-archive");
    startActivity(intent);

But this code opens standard installation dialog. How can I install app silently without root with granted android.permission.INSTALL_PACKAGES?

PS I am writing an app that will install many apks from folder into the system on the first start (replace Setup Wizard). I need it to make firmware lighter.

If you think that I am writing a virus: All programs are installed into /data/app. Permission Install_packages can only be granted to system-level programs located in /system/app or signed with the system key. So virus can't get there.

As said http://www.mail-archive.com/android-porting@googlegroups.com/msg06281.html apps CAN be silent installed if they have install_packages permission. Moreover you don't need Install_packages permission to install packages not silently. Plus http://www.androidzoom.com/android_applications/tools/silent-installer_wgqi.html


Source: (StackOverflow)

Installing PDO driver on MySQL Linux server

I was suggested, not long ago, to change my code to use PDO in order to parameterize my queries and safely save HTML in the database.

Well, here are the main problems:

  1. I looked at http://php.net/manual/en/ref.pdo-mysql.php and I don't really get where I should put that $ ./configure --with-pdo-mysql string...

  2. The site I'm building actually only requires PDO for one page. While I may consider re-writing it, it would take a while and I need the pages to be running soon, so I can't turn off MySQL completely. If I do install PDO, will I still be able to use mysql_* handlers?

The server in question is running PHP Version 5.4.6-1ubuntu1 and apache/2.2.22 (Ubuntu). I'm also running a PHPMyAdmin database, if it matters.


Source: (StackOverflow)

npm install errors with Error: ENOENT, chmod

I am trying to globally install an npm module I just published. Every time I try to install, either from npm or the folder, I get this error.

npm ERR! Error: ENOENT, chmod '/usr/local/lib/node_modules/takeapeek/lib/cmd.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 3.8.0-19-generic
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "takeapeek"
npm ERR! cwd /home/giodamlio
npm ERR! node -v v0.10.6
npm ERR! npm -v 1.3.6
npm ERR! path /usr/local/lib/node_modules/takeapeek/lib/cmd.js
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/giodamlio/npm-debug.log
npm ERR! not ok code 0

I am using sudo and I have triple checked everything in the package everything should work. I did some searching around, and saw a couple of similer cases none of which have been resolved. Here is what I tried.

  • Upgrade npm (sudo npm install -g npm)
  • Clear the global npm cache (sudo npm cache clear)
  • Clear the user npm cache (npm cache clear)

I noticed that the error had to do with the file I am linking to the path, specifically when npm tried to do a chmod. That shouldn't be a problem, my lib/cli.js has normal permissions, and npm has superuser permissions during this install.

After digging through the npm docs I found an option that would stop npm from making the bin links(--no-bin-links), when I tried the install with it, it worked fine.

So what's the deal? Is this some weird fringe case bug that has no solution yet?

Edit: For reference, here is the module I uploaded


Source: (StackOverflow)

Unable to install Pygame using pip

I'm trying to install Pygame. I am running Windows 7 with Enthought Python Distribution. I successfully installed pip, but when I try to install Pygame using pip, I get the following error:

"Could not install requirement Pygame because of HTTP error HTTP error 400: Bad request for URL ..."

I can't find anything about this issue with a Google search, but I did find another Stack Overflow question that prompted the asker to use the following command:

pip install hg+http://bitbucket.org/pygame/pygame

This gave me the following error:

Cannot find command hg

I'm not sure what else to do, as everything I find with a Google search is for Mac, so I don't know how well I can follow those instructions on Windows.


Source: (StackOverflow)

How to get tf.exe (TFS command line client)?

What's the minimum amount of software I need to install to get the 'tf.exe' program?


Source: (StackOverflow)

Android SDK install problem [duplicate]

Possible Duplicate:
Android SDK installation doesn't find JDK

I have installed Java runtime 6 to C:\src\libraries\jre6.

I installed Java JDK to C:\src\libraries\javasdk

My %PATH% is set to:

PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\system32 \WindowsPowerShell\v1.0;C:\src\libraries\javasdk\bin;C:\src\libraries\javasdk;C: \src\libraries\javasdk\jdk\bin;C:\src\libraries\javasdk\jdk;C:\src\libraries\jav asdk;

When I run the Android SDK installer I get the error "Java SE development Kit (JDK) not found".

I'm at a loss as to what the Android SDK cannot really find. What is wrong?


Source: (StackOverflow)

Maven Installation OSX Error Unsupported major.minor version 51.0

I installed maven by following this steps:(a tutorial)

JAVA_HOME=/Library/Java/Home
export M2_HOME=/Users/steven/zimmermann/maven
export M2=$M2_HOME/bin
export PATH=$M2:$PATH

echo $JAVA_HOME
echo $M2_HOME
echo $M2
echo $PATH

nano .bash_profile

then I wrote the echo in the .bash_profile sth like this:

JAVA_HOME=/usr/libexec/java_home
M2_HOME=/path/to/your/apache-maven-3.x.x
M2=/path/to/your/apache-maven-3.x.x/bin
PATH=/path/to/maven/bin:/$….bla-bla-bla…

and also I wrote this in the .bashrc

export M2_HOME=/Users/steven/zimmermann/maven
export M2=$M2_HOME/bin
export PATH=$M2:$PATH

now when I want to check the version (mvn -v) I get the following Exception: I think there are some versions wrong, but I don't know.

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:401)
    at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:254)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
    at org.codehaus.plexus.classworlds.launcher.Launcher.getMainClass(Launcher.java:144)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:266)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

Additional Informations:

java -version

java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)

javac -version

javac 1.8.0_40

Thank you!


Source: (StackOverflow)