problems about making our own package of mongodb on Ubtunu
Hi guys:
Who is familiar with packing on Ubtunu, please help me.
I want to create my own deb package on Ubtunu 14.04 using dh_make,dh_install and so on. I put the postinst file in mongodbdebbuild
Selecting previously unselected package mongodbdebbuild.
(Reading database ... 170486 files and directories currently installed.)
Preparing to unpack mongodbdebbuild
Unpacking mongodbdebbuild (1.0-1) ...
Setting up mongodbdebbuild (1.0-1) ...
dpkg (subprocess): unable to execute installed post-installation script (/var/lib/
dpkg: error processing package mongodbdebbuild (--install):
subprocess installed post-installation script returned error exit status 2
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
mongodbdebbuild
The message shows /var/lib/
root@root-VM:/etc# ls -al /var/lib/
-rwxr-xr-x 1 root root 2704 Nov 8 02:18 /var/lib/
The comment of postinst:
#!/bin/bash
set -x
SOURCEFILE2=
SOURCEFILE4=
while IFS='' read -r line || [[ -n "$line" ]];do
read -r key value <<< "$line"
if [[ ! $line =~ ^# && $line ]]; then
#echo "Key:$key -Value:$value"
declare -A array
array[
fi
done < "/etc/install.conf"
for keyname in "${!array[@]}";do
case $keyname in
esac
#echo "key : $keyname"
#echo "value: ${array[$keyname]}"
done;
echo "DBServiceName value is :$dbservicename"
echo "DBSystemUser value is :$dbsystemuser"
echo "DBSystemGroup value is :$dbsystemgroup"
echo "RootPath value is :$rootpath"
echo "DBPath value is :$dbpath"
echo "DataPath value is :$datapath"
echo "LogPath value is :$logpath"
echo "BindIp value is :$bindip"
echo "DBPort value is :$dbport"
echo "ReplicaSetName value is :$replicasetname"
echo "CPULimit value is :$cpulimit"
echo "MemoryLimit value is :$memorylimit"
echo "UninstallSaveData value is :$uninstallsave
echo "RequireSSL value is :$requiressl"
echo "CertPath value is :$certpath"
echo "KeyPath value is :$keypath"
echo "SingleNode value is :$singlenode"
echo "ReplicaSetMembers value is :$replicasetmem
echo "ReplicaSetKeyFile value is :$replicasetkey
chmod a+x $dbpath
mv -f $SOURCEFILE2 $dbservicename
chmod a+x $dbservicename
mv -f $SOURCEFILE4 mongod
mkdir -p $datapath
mkdir -p $logpath
touch $logpath/mongod.log
echo "Hello World!"
echo "Hello World!"
echo "Hello World!"
exit 0
I have no idea. The errors are the same on Ubuntu 14.04 and Ubuntu 16.04
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Ubuntu dpkg Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask liuyang for more information if necessary.