[SOLVED] Can't upgrade from Wheezy to Jessie BCoz Php-Pear

New to Debian (Or Linux in general)? Ask your questions here!

[SOLVED] Can't upgrade from Wheezy to Jessie BCoz Php-Pear

Postby winda » 2017-03-10 04:02

I wanna upgrade from wheezy to jessie, indeed I've modified sources.list and did an apt-get update.
But I failed when apt-get upgrade process.

Here, take a look :

Code: Select all
root@articaproxy:~# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
 blablablabla....blablabla...
The following packages will be upgraded:
  php-pear
1 upgraded, 0 newly installed, 0 to remove and 532 not upgraded.
125 not fully installed or removed.
Need to get 284 kB of archives.
After this operation, 127 kB disk space will be freed.
Do you want to continue [Y/n]? y

Get:1 http://packages.dotdeb.org/ jessie/all php-pear all 1:1.10.1+submodules+notgz-8.1 [284 kB]
Fetched 284 kB in 8s (34.9 kB/s)
Reading changelogs... Done
(Reading database ... 56583 files and directories currently installed.)
Preparing to replace php-pear 5.4.45-0+deb7u6 (using .../php-pear_1%3a1.10.1+submodules+notgz-8.1_all.deb) ...
dpkg-maintscript-helper: error: command symlink_to_dir is unknown
Hint: upgrading dpkg to a newer version might help.

Usage: dpkg-maintscript-helper <command> <parameter>... -- <maintainer-script-parameter>...

Commands:
  supports <command>
        Returns 0 (success) if the given command is supported, 1 otherwise.
  rm_conffile <conffile> [<last-version> [<package>]]
        Remove obsolete conffile. Must be called in preinst, postinst and
        postrm.
  mv_conffile <old-conf> <new-conf> [<last-version> [<package>]]
        Rename a conffile. Must be called in preinst, postinst and postrm.
  help
        Display this usage information.
dpkg: error processing /var/cache/apt/archives/php-pear_1%3a1.10.1+submodules+notgz-8.1_all.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
dpkg-maintscript-helper: error: command symlink_to_dir is unknown
Hint: upgrading dpkg to a newer version might help.

Usage: dpkg-maintscript-helper <command> <parameter>... -- <maintainer-script-parameter>...

Commands:
  supports <command>
        Returns 0 (success) if the given command is supported, 1 otherwise.
  rm_conffile <conffile> [<last-version> [<package>]]
        Remove obsolete conffile. Must be called in preinst, postinst and
        postrm.
  mv_conffile <old-conf> <new-conf> [<last-version> [<package>]]
        Rename a conffile. Must be called in preinst, postinst and postrm.
  help
        Display this usage information.
dpkg: error while cleaning up:
 subprocess new post-removal script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/php-pear_1%3a1.10.1+submodules+notgz-8.1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


Anyone have any ideas?
Last edited by winda on 2017-03-14 12:03, edited 1 time in total.
User avatar
winda
 
Posts: 3
Joined: 2017-03-10 03:56
Location: Indonesia

Re: [HELP] Can't upgrade from Wheezy to Jessie BCoz Php-Pear

Postby dilberts_left_nut » 2017-03-10 04:31

Well, that looks pretty messy.- and dotdeb is not a debian repo, you should have removed it and made sure you were 'vanilla' and uo to date on wheezy prior to attempting a dist- upgrade.

See https://www.debian.org/releases/stable/ ... ng.en.html

Maybe try removing those problematic packages.

Worst case is a backup data and install a fresh Jessie.
AdrianTM wrote:There's no hacker in my grandma...
User avatar
dilberts_left_nut
 
Posts: 4628
Joined: 2009-10-05 07:54
Location: enzed

Re: [HELP] Can't upgrade from Wheezy to Jessie BCoz Php-Pear

Postby horgh » 2017-03-10 05:58

Yeah, I would try cleaning out your sources.list so that you only have official repositories listed, and try again.

Should be something like...

Code: Select all
deb http://httpredir.debian.org/debian jessie main contrib non-free

deb http://httpredir.debian.org/debian jessie-updates main contrib non-free

deb http://security.debian.org/ jessie/updates main contrib non-free


Removing some packages that are from other repositories may be necessary as already suggested. One tricky thing would be finding out what repository each package is from. A short script or aptitude query could work. If you're interested, I have a short script to print out packages with their repositories here: https://gist.github.com/horgh/6a431dea45c2d92e5b84e6fb92520eda

But possibly you could get away with not mass removing unofficial packages.
horgh
 
Posts: 58
Joined: 2008-12-13 10:28

Re: [HELP] Can't upgrade from Wheezy to Jessie BCoz Php-Pear

Postby winda » 2017-03-10 06:42

Okay, I forgot to change the URL, I just replaced wheezy to jessie hahaha :oops:
I've fixed the sources.list.
But the upgrade still failed :(

Code: Select all
root@articaproxy:~# apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
root@articaproxy:~# apt-get clean all
root@articaproxy:~# apt-get update
Hit http://debian.mirror.uber.com.au jessie Release.gpg
Hit http://debian.mirror.uber.com.au jessie-updates Release.gpg
Hit http://security.debian.org jessie/updates Release.gpg
Hit http://security.debian.org jessie/updates Release
Hit http://security.debian.org jessie/updates/main Sources
Hit http://debian.mirror.uber.com.au jessie Release
Hit http://debian.mirror.uber.com.au jessie-updates Release
Hit http://security.debian.org jessie/updates/contrib Sources
Hit http://debian.mirror.uber.com.au jessie/main Sources
Hit http://security.debian.org jessie/updates/main amd64 Packages
Hit http://debian.mirror.uber.com.au jessie/main amd64 Packages
Hit http://debian.mirror.uber.com.au jessie/main Translation-en
Hit http://security.debian.org jessie/updates/contrib amd64 Packages
Hit http://security.debian.org jessie/updates/contrib Translation-en
Hit http://security.debian.org jessie/updates/main Translation-en
Hit http://debian.mirror.uber.com.au jessie-updates/main Sources
Hit http://debian.mirror.uber.com.au jessie-updates/contrib Sources
Get:1 http://debian.mirror.uber.com.au jessie-updates/main amd64 Packages/DiffIndex [6,916 B]
Hit http://debian.mirror.uber.com.au jessie-updates/contrib amd64 Packages
Hit http://debian.mirror.uber.com.au jessie-updates/contrib Translation-en
Get:2 http://debian.mirror.uber.com.au jessie-updates/main Translation-en/DiffIndex [2,704 B]
Fetched 9,620 B in 4s (2,001 B/s)
Reading package lists... Done
root@articaproxy:~# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
E: Unmet dependencies. Try using -f.
root@articaproxy:~# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

User avatar
winda
 
Posts: 3
Joined: 2017-03-10 03:56
Location: Indonesia

Re: [HELP] Can't upgrade from Wheezy to Jessie BCoz Php-Pear

Postby horgh » 2017-03-10 18:06

What does
Code: Select all
apt-get check
say?

Likely what will resolve this is removing whatever packages are causing issues. The trick will be finding which ones need removal. It's unfortunate apt-get is not showing any package names!

There is probably a way to show more about what is doesn't like, but I'm sure how...

Does
Code: Select all
apt-get autoremove
show anything to remove?

How about removing the package php-pear that was causing a problem before?

Does
Code: Select all
apt-cache policy
show anything surprising? Pinned packages maybe?

If none of the above helps, I'd probably look at removing any packages that are not from the official repositories.
horgh
 
Posts: 58
Joined: 2008-12-13 10:28

Re: [HELP] Can't upgrade from Wheezy to Jessie BCoz Php-Pear

Postby stevepusser » 2017-03-10 18:52

The dotdeb repository has newer packages than Wheezy for LAMP-type stuff and will often interfere with dist-upgrades like this. The only way to make sure the upgrade goes smoothly is to remove any dotdeb packages and do the dist-upgrade. You can reinstall the packages after the upgrade either from the Jessie repo, or restore dotdeb if you want/need the shiny new shi..stuff.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: AzPainter 2.0.6, Pale Moon 27.4.1, Liquorix kernel 4.11-9, mpv 0.26.0, Kodi 17.3, 0ad 0.0.22, Mesa 13.0.6
User avatar
stevepusser
 
Posts: 8519
Joined: 2009-10-06 05:53

[SOLVED] Can't upgrade from Wheezy to Jessie BCoz Php-Pear

Postby winda » 2017-03-14 12:00

stevepusser wrote:The dotdeb repository has newer packages than Wheezy for LAMP-type stuff and will often interfere with dist-upgrades like this. The only way to make sure the upgrade goes smoothly is to remove any dotdeb packages and do the dist-upgrade. You can reinstall the packages after the upgrade either from the Jessie repo, or restore dotdeb if you want/need the shiny new shi..stuff.

Thanks, Solved :mrgreen:
I search the held package and remove the package

dpkg --configure --pending
rm -rf /var/lib/dpkg/info/packagename-*

After that I did the update, upgrade and dist-upgrade

I
User avatar
winda
 
Posts: 3
Joined: 2017-03-10 03:56
Location: Indonesia


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable