I am trying to integrate my java project build with gradle with sonarqube add-on in travis below is my script, when I commit anything travis build is getting triggered but it is failed with permission denied error. How to get past this error?
language: java
sudo: false
install: true
addons:
sonarqube:
token:
secure: "q2nz2BsoZpki0kNkvieSv3UVBu0O93kOXzcyYcRBrz7QTchJ8ma5WDX/ZMAYiC2BZDZDXWSO7mh88pbWUpRPUgsmU1hRTUltRUPqUv2RIlfy88eZefdCLGRfOiDpvrBVBCROiBygQMO1VPj4b3NSxjYwK7I89a5IS8UuYc2DLM+7yv5xLOLLjmK42HU28Z/5TNjjHKaPjY6Oem5H5KHf5CP3ZMqrSkSn4dvQIIowmOISlgbc0TYBTBiJnpwTwfgyS1oPjkMhwMvGxGoPZONIsmUBEH+kZSJMTomM+HS3YoAai4ZuFOodr5H+b2LItSBPXMBQV4DRX3QTW2On4Oz+UnLK2w9QBZ0KgE1dJqPD/y8N4jbs6ef2xBhviWYeAn+NMg1pluq/1VmUbsm7J0ocsSzilQpkMFYreIHZtIDluvLogBznzw2CSRUMhZg2fq+DFydLMvLFhxjbI8z9F7+IVl2P0NAUuh3fKqZAXshPN2Sofp+PfEP4VLyv6EhBonjngIbnNB5fOEyUW1a6QwT7IABDV3dD7kFYyoPAdekMpEFzwlljZjimCa6e7OPW1Lo9vv8CpSz4ggqXzf8hjleJkJ3XnEfM7h2dv943/aCS1wE5K4641rr5klrbIJk+/pmiCmBON/ccpbbV1eLpDnFLai1rCnstIH0j7Dz2L6BOJYY="
jdk:
- oraclejdk8
script:
- ./gradlew sonarqube
cache:
directories:
- '$HOME/.m2/repository'
- '$HOME/.sonar/cache'
- '$HOME/.gradle'
- '.gradle'
notifications:
email: false
My Log
Worker information
hostname: ip-10-12-6-59:ef24a578-e5d1-4580-a6a8-03124000caa1
version: v2.5.0-8-g19ea9c2 https://github.com/travis-ci/worker/tree/19ea9c20425c78100500c7cc935892b47024922c
instance: 03a5439:travis:java
startup: 2.389915121s
Build system information
Build language: java
Build group: stable
Build dist: precise
Build id: 186641574
Job id: 186641575
travis-build version: 7cac7d393
Build image provisioning date and time
Thu Feb 5 15:09:33 UTC 2015
Operating System Details
Distributor ID: Ubuntu
Description: Ubuntu 12.04.5 LTS
Release: 12.04
Codename: precise
Linux Version
3.13.0-29-generic
Cookbooks Version
a68419e https://github.com/travis-ci/travis-cookbooks/tree/a68419e
GCC version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
LLVM version
clang version 3.4 (tags/RELEASE_34/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Pre-installed Ruby versions
ruby-1.9.3-p551
Pre-installed Node.js versions
v0.10.36
Pre-installed Go versions
1.4.1
Redis version
redis-server 2.8.19
riak version
2.0.2
MongoDB version
MongoDB 2.4.12
CouchDB version
couchdb 1.6.1
Neo4j version
1.9.4
RabbitMQ Version
3.4.3
ElasticSearch version
1.4.0
Installed Sphinx versions
2.0.10
2.1.9
2.2.6
Default Sphinx version
2.2.6
Installed Firefox version
firefox 31.0esr
PhantomJS version
1.9.8
ant -version
Apache Ant(TM) version 1.8.2 compiled on December 3 2011
mvn -version
Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T17:29:23+00:00)
Maven home: /usr/local/maven
Java version: 1.7.0_76, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-oracle/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "3.13.0-29-generic", arch: "amd64", family: "unix"
$ export DEBIAN_FRONTEND=noninteractive
W: Size of file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_precise-updates_restricted_binary-amd64_Packages.gz is not what the server reported 19576 20785
W: Size of file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_precise-updates_restricted_binary-i386_Packages.gz is not what the server reported 19521 20707
W: Size of file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_precise-backports_multiverse_source_Sources.gz is not what the server reported 5886 5888
W: Size of file /var/lib/apt/lists/ppa.launchpad.net_travis-ci_zero-mq_ubuntu_dists_precise_main_binary-amd64_Packages.gz is not what the server reported 832 1195
W: Size of file /var/lib/apt/lists/ppa.launchpad.net_ubuntugis_ppa_ubuntu_dists_precise_main_binary-amd64_Packages.gz is not what the server reported 33653 36677
W: Size of file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_precise-security_restricted_binary-amd64_Packages.gz is not what the server reported 13782 14904
W: Size of file /var/lib/apt/lists/ppa.launchpad.net_ubuntugis_ppa_ubuntu_dists_precise_main_binary-i386_Packages.gz is not what the server reported 33699 36733
W: Size of file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_precise-security_restricted_binary-i386_Packages.gz is not what the server reported 13751 14885
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
libc-bin libc-dev-bin libc6-dev
Suggested packages:
glibc-doc
The following packages will be upgraded:
libc-bin libc-dev-bin libc6 libc6-dev
4 upgraded, 0 newly installed, 0 to remove and 267 not upgraded.
Need to get 8,840 kB of archives.
After this operation, 14.3 kB disk space will be freed.
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libc6-dev amd64 2.15-0ubuntu10.15 [2,943 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libc-dev-bin amd64 2.15-0ubuntu10.15 [84.7 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libc-bin amd64 2.15-0ubuntu10.15 [1,177 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libc6 amd64 2.15-0ubuntu10.15 [4,636 kB]
Fetched 8,840 kB in 0s (30.7 MB/s)
Preconfiguring packages ...
(Reading database ... 72019 files and directories currently installed.)
Preparing to replace libc6-dev 2.15-0ubuntu10.10 (using .../libc6-dev_2.15-0ubuntu10.15_amd64.deb) ...
Unpacking replacement libc6-dev ...
Preparing to replace libc-dev-bin 2.15-0ubuntu10.10 (using .../libc-dev-bin_2.15-0ubuntu10.15_amd64.deb) ...
Unpacking replacement libc-dev-bin ...
Preparing to replace libc-bin 2.15-0ubuntu10.10 (using .../libc-bin_2.15-0ubuntu10.15_amd64.deb) ...
Unpacking replacement libc-bin ...
Processing triggers for man-db ...
Setting up libc-bin (2.15-0ubuntu10.15) ...
(Reading database ... 72018 files and directories currently installed.)
Preparing to replace libc6 2.15-0ubuntu10.10 (using .../libc6_2.15-0ubuntu10.15_amd64.deb) ...
Unpacking replacement libc6 ...
Setting up libc6 (2.15-0ubuntu10.15) ...
Setting up libc-dev-bin (2.15-0ubuntu10.15) ...
Setting up libc6-dev (2.15-0ubuntu10.15) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
$ git clone --depth=50 --branch=master https://github.com/rajadilipkolli/secure-ecommerce.git rajadilipkolli/secure-ecommerce
Cloning into 'rajadilipkolli/secure-ecommerce'...
remote: Counting objects: 97, done.
remote: Compressing objects: 100% (79/79), done.
remote: Total 97 (delta 35), reused 59 (delta 1), pack-reused 0
Unpacking objects: 100% (97/97), done.
Checking connectivity... done.
$ cd rajadilipkolli/secure-ecommerce
$ git checkout -qf 3a028e7b2153c3f2145e53095f7e763f9c4ee22b
This job is running on container-based infrastructure, which does not allow use of 'sudo', setuid and setguid executables.
If you require sudo, add 'sudo: required' to your .travis.yml
See https://docs.travis-ci.com/user/workers/container-based-infrastructure/ for details.
$ jdk_switcher use oraclejdk8
Switching to Oracle JDK8 (java-8-oracle), JAVA_HOME will be set to /usr/lib/jvm/java-8-oracle
$ export TERM=dumb
Setting up build cache
$ export CASHER_DIR=$HOME/.casher
$ Installing caching utilities
attempting to download cache archive
fetching master/cache-linux-precise-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855--jdk-oraclejdk8.tgz
found cache
adding /home/travis/.m2/repository to cache
adding /home/travis/.sonar/cache to cache
creating directory /home/travis/.sonar/cache
adding /home/travis/.gradle to cache
creating directory /home/travis/.gradle
adding /home/travis/build/rajadilipkolli/secure-ecommerce/.gradle to cache
creating directory /home/travis/build/rajadilipkolli/secure-ecommerce/.gradle
repository is not yet cached
$ java -Xmx32m -version
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
$ javac -J-Xmx32m -version
javac 1.8.0_31
$ true
SonarQube addon
addon hash: 187bb90a8521235b4b8c8a4e70fb431b
Preparing SonarQube Scanner CLI
Archive: /home/travis/.sonarscanner/sonar-scanner.zip
creating: /home/travis/.sonarscanner/sonar-scanner-2.8/
inflating: /home/travis/.sonarscanner/sonar-scanner-2.8/bin/sonar-scanner.bat
inflating: /home/travis/.sonarscanner/sonar-scanner-2.8/bin/sonar-scanner-debug
inflating: /home/travis/.sonarscanner/sonar-scanner-2.8/lib/sonar-scanner-cli-2.8.jar
inflating: /home/travis/.sonarscanner/sonar-scanner-2.8/bin/sonar-scanner
inflating: /home/travis/.sonarscanner/sonar-scanner-2.8/conf/sonar-scanner.properties
inflating: /home/travis/.sonarscanner/sonar-scanner-2.8/bin/sonar-runner.bat
inflating: /home/travis/.sonarscanner/sonar-scanner-2.8/bin/sonar-runner
inflating: /home/travis/.sonarscanner/sonar-scanner-2.8/bin/sonar-scanner-debug.bat
$ export SONAR_SCANNER_HOME=$HOME/.sonarscanner/sonar-scanner-2.8
Not installing SonarSource build-wrapper because it's a Java or Javascript project
Preparing SonarQube Scanner parameters
$ ./gradlew sonarqube
/home/travis/build.sh: line 57: ./gradlew: Permission denied
The command "./gradlew sonarqube" exited with 126.
store build cache
nothing changed, not updating cache
Done. Your build exited with 1.
Looks like the file gradlew does not have the permission bit set. You can verify this by doing:
install:
- chmod +x gradlew
If this works out, you might want to set the permission bit in your repository and remove above configuration.
Related
I have proper version of erlang, according to https://www.rabbitmq.com/which-erlang.html.
But when I try to install rabbitmq-server-3.7.1 on my CentOS7 it says that I have wrong erlang version, and I need version >= 19.3.
But I already have 20.
What am I doing wrong?
test_user#test_machine: ~/Downloads
$ sudo yum install rabbitmq-server-3.7.1-1.el7.noarch.rpm
Loaded plugins: fastestmirror, langpacks, versionlock
Examining rabbitmq-server-3.7.1-1.el7.noarch.rpm: rabbitmq-server-3.7.1-1.el7.noarch
Marking rabbitmq-server-3.7.1-1.el7.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package rabbitmq-server.noarch 0:3.7.1-1.el7 will be installed
--> Processing Dependency: erlang >= 19.3 for package: rabbitmq-server-3.7.1-1.el7.noarch
Loading mirror speeds from cached hostfile
* base: mirror.awanti.com
* epel: mirror.awanti.com
* extras: mirror.awanti.com
* updates: mirror.awanti.com
--> Processing Dependency: socat for package: rabbitmq-server-3.7.1-1.el7.noarch
--> Running transaction check
---> Package rabbitmq-server.noarch 0:3.7.1-1.el7 will be installed
--> Processing Dependency: erlang >= 19.3 for package: rabbitmq-server-3.7.1-1.el7.noarch
---> Package socat.x86_64 0:1.7.3.2-2.el7 will be installed
--> Finished Dependency Resolution
Error: Package: rabbitmq-server-3.7.1-1.el7.noarch (/rabbitmq-server-3.7.1-1.el7.noarch)
Requires: erlang >= 19.3
Available: erlang-R16B-03.18.el7.x86_64 (epel)
erlang = R16B-03.18.el7
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
My erlang version:
test_user#test_machine: ~/Downloads
$ erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell
"20"
test_user#test_machine: ~/Downloads
$ erl --version
Erlang/OTP 20 [erts-9.1.5] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V9.1.5 (abort with ^G)
1>
EDITED:
That's my steps of erlang installation:
I downloaded from https://www.erlang-solutions.com/resources/download.html 20.1.7 64bit version for CentOS 7
Then I ran:
sudo yum install esl-erlang_20.1.7-1~centos~7_amd64.rpm
Here is installed "erl" packages:
test_user#test_machine: ~
$ yum list installed | grep erl | grep -v perl
esl-erlang.x86_64 20.1.7-1 installed
Using a fresh CentOS 7 VM and the esl-erlang_20.1.7-1~centos~7_amd64.rpm rpm produces this result. You can see that yum can't resolve some dependencies. I am not sure why.
The RabbitMQ team produces zero-dependency RPM files for just this reason. You should uninstall Erlang from your system, and install the package from here.
On my test system, the above package installs successfully followed by RabbitMQ. Complete information can be found here:
https://www.rabbitmq.com/install-rpm.html
so I'm currently trying to upgrade the python version in the bash on ubuntu on windows subsystem. However from my understanding it is not easy to update python from the command line. Lastly, "where" exactly is my unix subsystem? For example, is there something like a unix portion on my file system, where I can just drag files into? Thanks
It is an older question, however I had to do the same thing today (use python3.6 on my windows 10 laptop).
Press Windows + R (to open the run command dialog)
Type: bash + press Enter
You will get a new windows bash prompt window.
Type first lsb_release -a to check that you run the latest bash/ubuntu environment on your Windows Machine (might be ubuntu 14.04, while 16.04 is the current one).
raz#HOSTNAME:~/myPlayground$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.4 LTS
Release: 16.04
Codename: xenial
If you are running an older version upgrade by running do-release-upgrade
raz#HOSTNAME:~/myPlayground$ sudo do-release-upgrade
[sudo] password for raz:
Checking for a new Ubuntu release
No new release found.
Add the PPA custom repository (the standard apt repos have only 3.5 for now)
raz#HOSTNAME:~/myPlayground$ sudo add-apt-repository ppa:jonathonf/python-3.6
A plain backport of *just* Python 3.6. System extensions/Python libraries may or may not work.
Don't remove Python 3.5 from your system - it will break.
More info: https://launchpad.net/~jonathonf/+archive/ubuntu/python-3.6
Press [ENTER] to continue or ctrl-c to cancel adding it
gpg: keyring `/tmp/tmp5vq72la1/secring.gpg' created
gpg: keyring `/tmp/tmp5vq72la1/pubring.gpg' created
gpg: requesting key F06FC659 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmp5vq72la1/trustdb.gpg: trustdb created
gpg: key F06FC659: public key "Launchpad PPA for J Fernyhough" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
Update the apt information:
raz#HOSTNAME:~/myPlayground$ sudo apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:3 http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu xenial InRelease [18.0 kB]
Get:4 http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu xenial/main amd64 Packages [4,760 B]
Get:5 http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu xenial/main Translation-en [2,128 B]
Get:6 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]
Fetched 241 kB in 10s (22.2 kB/s)
Reading package lists... Done
Finally install python3.6:
raz#HOSTNAME:~/myPlayground$ sudo apt-get install python3.6
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libpython3.6-minimal libpython3.6-stdlib python3.6-minimal
Suggested packages:
python3.6-venv python3.6-doc binfmt-support
The following NEW packages will be installed:
libpython3.6-minimal libpython3.6-stdlib python3.6 python3.6-minimal
0 upgraded, 4 newly installed, 0 to remove and 3 not upgraded.
Need to get 4,505 kB of archives.
After this operation, 23.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu xenial/main amd64 libpython3.6-minimal amd64 3.6.5-5~16.04.york1 [574 kB]
Get:2 http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu xenial/main amd64 python3.6-minimal amd64 3.6.5-5~16.04.york1 [1,712 kB]
Get:3 http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu xenial/main amd64 libpython3.6-stdlib amd64 3.6.5-5~16.04.york1 [1,989 kB]
Get:4 http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu xenial/main amd64 python3.6 amd64 3.6.5-5~16.04.york1 [230 kB]
Fetched 4,505 kB in 4s (979 kB/s)
Selecting previously unselected package libpython3.6-minimal:amd64.
(Reading database ... 31944 files and directories currently installed.)
Preparing to unpack .../libpython3.6-minimal_3.6.5-5~16.04.york1_amd64.deb ...
Unpacking libpython3.6-minimal:amd64 (3.6.5-5~16.04.york1) ...
Selecting previously unselected package python3.6-minimal.
Preparing to unpack .../python3.6-minimal_3.6.5-5~16.04.york1_amd64.deb ...
Unpacking python3.6-minimal (3.6.5-5~16.04.york1) ...
Selecting previously unselected package libpython3.6-stdlib:amd64.
Preparing to unpack .../libpython3.6-stdlib_3.6.5-5~16.04.york1_amd64.deb ...
Unpacking libpython3.6-stdlib:amd64 (3.6.5-5~16.04.york1) ...
Selecting previously unselected package python3.6.
Preparing to unpack .../python3.6_3.6.5-5~16.04.york1_amd64.deb ...
Unpacking python3.6 (3.6.5-5~16.04.york1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Setting up libpython3.6-minimal:amd64 (3.6.5-5~16.04.york1) ...
Setting up python3.6-minimal (3.6.5-5~16.04.york1) ...
Setting up libpython3.6-stdlib:amd64 (3.6.5-5~16.04.york1) ...
Setting up python3.6 (3.6.5-5~16.04.york1) ...
raz#HOSTNAME:~/myPlayground$
Check your python versions:
raz#HOSTNAME:~/myPlayground$ python -V
Python 2.7.12
raz#HOSTNAME:~/myPlayground$ python3 -V
Python 3.5.2
raz#HOSTNAME:~/myPlayground$ python3.6 -V
Python 3.6.5
You can search your 'Start Menu' for 'Bash' and get the app that will open a command prompt from within Ubuntu Linux (not Unix).
AFAIK you cannot drag and drop into this from Explorer.exe but you may be able to run a Linux file app that can do this with X11 installed.
Finally, from Bash on Ubuntu command line app, you can run 'sudo apt-get install python3' to get latest for Ubuntu.
Opensuse Leap 42.2
trying to install ruby-2.4
zypper in ruby2.4
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following 4 NEW packages are going to be installed:
ruby2.1 ruby2.1-rubygem-gem2rpm ruby2.4 ruby-common
The following recommended package was automatically selected:
ruby2.1-rubygem-gem2rpm
4 new packages to install.
Overall download size: 521.0 KiB. Already cached: 0 B. After the
operation, additional 1.5 MiB will be used.
Continue? [y/n/...? shows all options] (y):
Why system wants to install an old version with a new one?
MongoDB did not install correctly because of some Dpkg errors. Trying to purge or remove
anything related just comes with the error. I have tried deleting all of the Mongodb libs and did a search for other files. I am not sure what caused the original error or how to get the system back to a workable state:
Setting up mongodb-org-server (2.6.5) ...
invoke-rc.d: unknown initscript, /etc/init.d/mongod not found.
dpkg: error processing mongodb-org-server (--configure):
subprocess installed post-installation script returned error exit status 100
Errors were encountered while processing:
mongodb-org-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
This is the original installation command
$ sudo apt-get install -y mongodb-org
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
The following NEW packages will be installed:
mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 115 MB of archives.
After this operation, 290 MB of additional disk space will be used.
Get:1 http://downloads-distro.mongodb.org/repo/ubuntu-upstart/ dist/10gen mongodb-org- shell amd64 2.6.5 [4,458 kB]
Get:2 http://downloads-distro.mongodb.org/repo/ubuntu-upstart/ dist/10gen mongodb-org- server amd64 2.6.5 [9,446 kB]
Get:3 http://downloads-distro.mongodb.org/repo/ubuntu-upstart/ dist/10gen mongodb-org- mongos amd64 2.6.5 [7,175 kB]
Get:4 http://downloads-distro.mongodb.org/repo/ubuntu-upstart/ dist/10gen mongodb-org- tools amd64 2.6.5 [93.7 MB]
Get:5 http://downloads-distro.mongodb.org/repo/ubuntu-upstart/ dist/10gen mongodb-org amd64 2.6.5 [3,656 B]
Fetched 115 MB in 4min 20s (441 kB/s)
Selecting previously unselected package mongodb-org-shell.
(Reading database ... 165525 files and directories currently installed.)
Unpacking mongodb-org-shell (from .../mongodb-org-shell_2.6.5_amd64.deb) ...
Selecting previously unselected package mongodb-org-server.
Unpacking mongodb-org-server (from .../mongodb-org-server_2.6.5_amd64.deb) ...
Selecting previously unselected package mongodb-org-mongos.
Unpacking mongodb-org-mongos (from .../mongodb-org-mongos_2.6.5_amd64.deb) ...
Selecting previously unselected package mongodb-org-tools.
Unpacking mongodb-org-tools (from .../mongodb-org-tools_2.6.5_amd64.deb) ...
Selecting previously unselected package mongodb-org.
Unpacking mongodb-org (from .../mongodb-org_2.6.5_amd64.deb) ...
Processing triggers for man-db ...
Setting up mongodb-org-shell (2.6.5) ...
Setting up mongodb-org-server (2.6.5) ...
Adding system user `mongodb' (UID 120) ...
Adding new user `mongodb' (UID 120) with group `nogroup' ...
Not creating home directory `/home/mongodb'.
Adding group `mongodb' (GID 126) ...
Done.
Adding user `mongodb' to group `mongodb' ...
Adding user mongodb to group mongodb
Done.
invoke-rc.d: unknown initscript, /etc/init.d/mongod not found.
dpkg: error processing mongodb-org-server (--configure):
subprocess installed post-installation script returned error exit status 100
Setting up mongodb-org-mongos (2.6.5) ...
Setting up mongodb-org-tools (2.6.5) ...
dpkg: dependency problems prevent configuration of mongodb-org:
mongodb-org depends on mongodb-org-server; however:
Package mongodb-org-server is not configured yet.
dpkg: error processing mongodb-org (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mongodb-org-server
mongodb-org
E: Sub-process /usr/bin/dpkg returned an error code (1)
Try using this init script.
init.d
If you previously installed MongoDB, uninstall it first.
To delete МongoDB.
sudo apt-get remove mongodb-10gen
After that delete confing files and init scripts
sudo find /etc/ | grep mongod.* | xargs rm -rf
sudo find /usr/bin/ | grep mongod.* | xargs rm -rf
sudo find /var/lib/ | grep mongod.* | xargs rm -rf
Warning!
/var/lib/ may contain your databases.
Install MongoDB
There are
apt-get autoremove
apt-get -f install
worthy to try first, if it doesn't work, actually I have mongodb-org-server in half-configure and no regular way to remove.
Then I found a worst solution which is to remove package status block. But you will lose track of the real package state and leave trash in your system.
So I check the error message we have, and I found this line interesting:
invoke-rc.d: unknown initscript, /etc/init.d/mongod not found.
Then I create a empty file to fool the invoke function.
touch /etc/init.d/mongod
And then try apt-get autoremove again and apt-get remove the package successfully!
Run this code
touch /etc/init.d/mongod
and then follow that link
https://community.c9.io/t/setting-up-mongodb/1717
Note: (--rest) is removed in latest release of mongo.
So, was reading about pkg-config (I think it's included by default on Debian, which I'm on). But every time I try to find the version for something, it gives me 0.26.
santeyio#Amadeus:/$ pkg-config --version python
0.26
santeyio#Amadeus:/$ pkg-config --version libre-office
0.26
santeyio#Amadeus:/$ pkg-config --version alsdkfj
0.26
santeyio#Amadeus:/$ pkg-config --version firefox
0.26
santeyio#Amadeus:/$
So, I tried sudo apt-get removing it, then installing it again. But I get the same results. I know I'm missing something stupid here... can anyone point me in the right direction?
Here's the output from my re-installing, if that's helpful...
santeyio#Amadeus:/$ sudo apt-get install pkg-config
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
calligra-l10n-engb cdparanoia comerr-dev k3b k3b-data k3b-i18n kdevelop-php-docs-l10n
kdevelop-php-l10n krb5-multidev language-pack-kde-en libasprintf0c2:i386 libcroco3:i386
libgcrypt11-dev libgnutls-dev libgnutls-openssl27 libgnutlsxx27 libgomp1:i386 libgpg-error-dev
libgssrpc4 libk3b6 libkadm5clnt-mit8 libkadm5srv-mit8 libkcddb4 libkdb5-6 libkrb5-dev libldap2-dev
libp11-kit-dev librtmp-dev libtasn1-3-dev linux-headers-3.5.0-17 postgresql-client-9.2
postgresql-common python-xkit screen-resolution-extra
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
pkg-config
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 41.3 kB of archives.
After this operation, 136 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ quantal/main pkg-config amd64 0.26-1ubuntu2 [41.3 kB]
Fetched 41.3 kB in 0s (66.2 kB/s)
Selecting previously unselected package pkg-config.
(Reading database ... 247983 files and directories currently installed.)
Unpacking pkg-config (from .../pkg-config_0.26-1ubuntu2_amd64.deb) ...
Processing triggers for man-db ...
Setting up pkg-config (0.26-1ubuntu2) ...
Use --modversion.
$ pkg-config --modversion python
2.7
pkg-config is meant to be used when compiling against a library -- if you're trying to check the version of a package, use dpkg -s
$ dpkg -s firefox
Package: firefox
Status: install ok installed
Priority: optional
Section: web
Installed-Size: 48531
Maintainer: Ubuntu Mozilla Team <ubuntu-mozillateam#lists.ubuntu.com>
Architecture: amd64
Version: 17.0.1+build1-0ubuntu0.12.04.1
Or apt-cache policy
$ apt-cache policy firefox
firefox:
Installed: 17.0.1+build1-0ubuntu0.12.04.1
Candidate: 20.0+build1-0ubuntu0.12.04.3
...